|
![](/i/fill.gif) |
Le 11/09/2009 23:02, Warp nous fit lire :
> clipka <ano### [at] anonymous org> wrote:
>> Maybe we can even go so far as to allow HTML colors in SDL code? Those
>> would automatically be subject to gamma correction.
>
> If a color is expected but a string is found instead, then that string
> could be interpreted as a color definition in HTML (or other similar)
> syntax.
>
> In other words, where you would normally write eg:
>
> rgb <.5, .75, 1>
>
> you can write instead:
>
> "#7FBFFF"
>
> As for a special shortcut syntax to gamma-precorrect regular color
> definitions, I don't have many good ideas. Perhaps @ as a prefix could
> work.
>
I hate srgb, but using html code is worst for povray. Within html, you
are limited to 0-1 range... whereas <..> notation is not. I like
"negative colours". And hdri like big ones!
If you want pre-gamma correct value, maybe its time for a
"srgb"/srgbf/... additional color code, specifying color in the silly
sRGB space (and then parser will gamma correct it to linear space on the
fly) BTW, would you gamma-correct F or T ??? why ?
Beware, valid html code could be #fff, #ffffff or even bigger (never
seen, but possible, any multiple of 3 symbols is ok; worse, a multiple
of 4 symbol might be rgba space... guess what happened for a 16
bit-component rgba vs 12 bit rgba : you cannot be right) but who cares
with today 5/6 bits LCD screens!
If you want #7FBFFF ... might I suggest a macro for that ? or just go
for it, but srgb seems cleaner to me.
Post a reply to this message
|
![](/i/fill.gif) |