POV-Ray : Newsgroups : povray.advanced-users : rgb vs srgb : Re: rgb vs srgb Server Time
26 Jun 2024 08:03:27 EDT (-0400)
  Re: rgb vs srgb  
From: Ive
Date: 10 Sep 2011 08:23:48
Message: <4e6b56d4@news.povray.org>
Am 10.09.2011 13:20, schrieb Thomas de Groot:

> What I see in POV-Ray is that, e.g. rgb <213,127,79> does not render
> identical to srgb <213,127,79>.

Well, assuming you are *not* talking about HDR values but actually mean
"<213,127,79> / 255" what is wrong with using the functions given within 
my very first reply?

#macro scRGB_to_sRGB(Color)
    rgb <sRGB_Gamma(Color.red),
	sRGB_Gamma(Color.green),
	sRGB_Gamma(Color.blue)>
#end

if you need the inverse transformation or actually want to input values 
in 8bit (0..255) range I'll leave it up to you to write these macro as 
an exercise ;)

But what I do not get is why you do not simply type srgb <whatever 
values> when you are actually using sRGB values (e.g. from a color 
picker) and rgb <whatever values> when using linear values.

-Ive


Post a reply to this message

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