POV-Ray : Newsgroups : povray.binaries.images : Re: Color question : Re: Color question Server Time
17 Aug 2024 06:16:10 EDT (-0400)
  Re: Color question  
From: Nathan Kopp
Date: 24 Nov 2001 13:12:05
Message: <3bffe2f5$1@news.povray.org>
"Bob H." <omn### [at] msncom> wrote...
>
> Wait a minute.  What's rgb 1 doing becoming rgbft 1 anyway.  Isn't this a
> bug then?  I knew color 1 became rgbft 1 but with rgb specified this
> shouldn't be happening, right?

Actually, "rgb 1" does not become <1,1,1,1,1>.  It will become <1,1,1,0,0>.
However, "rgb 1" is NOT what we have here.

The issue is that the parser interprets "rgb 1 - Gray25" as
    "rgb (1 - Gray25) "
which promotes to
    "rgb (<1,1,1,1,1> - Gray25)"
which becomes
    "rgb (<0.75,0.75,0.75,1,1>)"
and then the "rgb" gets ignored.

Instead you probably desired this:
    "(rgb 1) - Gray25"

Unfortunately, the parser won't accept that second version (with the "rgb 1"
wrapped in parentheses) as I wrote it above, but there are plenty of other
ways to work around this quirk in the POV parser.  Examples have been given
in previous replies.

-Nathan


Post a reply to this message

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