POV-Ray : Newsgroups : povray.advanced-users : CIE xyY color space : Re: CIE xyY color space Server Time
28 Apr 2024 10:28:29 EDT (-0400)
  Re: CIE xyY color space  
From: clipka
Date: 16 Mar 2017 20:08:55
Message: <58cb2917$1@news.povray.org>
Am 16.03.2017 um 17:56 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
> 
> Excellent information, as always.
> Al ways, always, always learning something new and useful here.   :)
> 
>> (It should be noted that `srgb <184/255, 115/255, 48/255> * Tone`
>> doesn't give you exactly what you are asking for. Theoretically it
>> should be `(srgb <184/255, 115/255, 48/255>) * Tone`, but that's
>> currently not allowed by the parser.)
> 
> So something along the lines of this would be necessary:
> (untested, needs handling of optional transmit and filter values)
> 
> #macro RGB2SRGB (C_linear)
...

No, what would be necessary is just the opposite: A mechanism to convert
from sRGB to linear. Because picked colours tend to be in sRGB, and what
POV-Ray needs deep down in its heart is linear.

Which is precisely what the `srgb` keyword was designed to do (presuming
you're using `assumed_gamma 1.0` like you should).

The only drawback is that you can't put `srgb` in brackets to multiply
that expression (which would be a linear colour) with a `Tone` factor.
And if you omit the bracket you get a multiplication in sRGB space
(effectively `srgb (<...>*Tone)`), which isn't exactly what you need.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.