POV-Ray : Newsgroups : povray.beta-test : Gamma in POV-Ray 3.6 vs. 3.7 : Re: Gamma in POV-Ray 3.6 vs. 3.7 Server Time
6 Jul 2024 04:13:32 EDT (-0400)
  Re: Gamma in POV-Ray 3.6 vs. 3.7  
From: clipka
Date: 11 Sep 2009 17:45:07
Message: <4aaac4e3$1@news.povray.org>
Warp schrieb:
>   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"

I don't like this one, because it adds some stuff (the quotes) which 
shouldn't be necessary in an ideal world. (In addition, it might make 
people try to use other strings there, which would open up the problem 
of how to deal with unrecognized ones, and whether only string literals 
would be allowed or also string variables.)

How about this - it should be perfectly safe:

A hash sign (#) followed by six uppercase(!) hex digits could denote a 
HTML color.

With POV-Ray's reserved words being all-lowercase, and purely numerical 
values after a hash not being used at present, this should be perfectly 
unambiguous.

(At present, six lowercase hex digits should also be safe: Unless I'm 
mistaken, the only token that could be interpreted as a hex value is 
"df3", which isn't used after a hash sign, nor is it six characters 
long. However, that isn't guaranteed to stay this way.)


Post a reply to this message

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