|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |