POV-Ray : Newsgroups : povray.newusers : Translate colors : Re: Translate colors Server Time
5 Sep 2024 06:15:56 EDT (-0400)
  Re: Translate colors  
From: Jérôme Grimbert
Date: 14 Aug 2001 07:20:50
Message: <3B790A0C.A708C344@atosorigin.com>
Hershel Robinson wrote:
> 
> Ray-tracers,
> 
> How do I translate colors from HTML format, i.e. color="#D5EAFF" to POV
> format?
> 
> I, like any newbie, figured that D5 (213 in decimal) divided by 256 is 0.832
> and likewise, EA becomes 0.914.  I naturally then tried

Sorry, but you have to divide by 255  (not 256).
Pure White is 255, and in pov it's 1.


> 
> pigment { rgb <0.832 , 0.914, 1> }

Unless the ambient is 1 (which is not the default), 
the texture will only reflect part of the light it get,
multiplying by the pigment

(a reflected <1,1,1> would get out as desired, but it rarely 
happen)

Moreover, there is a gamma correction applied to the pov-output.
The default gamma is 2.2 (unless, like me, you have a custom built
pov so as to get a default gamma of 1, 
but then you wouldn't have posted here)


Post a reply to this message

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