POV-Ray : Newsgroups : povray.general : remap RGBT color to anther RGBT color? : Re: remap RGBT color to anther RGBT color? Server Time
30 Jul 2024 06:20:54 EDT (-0400)
  Re: remap RGBT color to anther RGBT color?  
From: clipka
Date: 10 Jul 2009 19:40:01
Message: <web.4a57d03abddeda8444f4a5670@news.povray.org>
"caduser" <nomail@nomail> wrote:
> One of my colleagues suggested we take this approach:
>
> color rgbt <<%R%> * 0.8 + 0.2,<%G%> * 0.8 + 0.2,<%B%> * 0.8 + 0.2,<%A%>>
>
> But that also forces light gray to white by pushing every color and this has the
> same problem pure white and pure black are not good in renderings and also not
> desirable in print.

Looks reasonable.

If you want to move a bit away from white as well, you may want to try this one:

  color rgbt <<%R%> * 0.6 + 0.2,<%G%> * 0.6 + 0.2,<%B%> * 0.6 + 0.2,<%A%>>

(Note that this just replaces the 0.8 in your above formula with 0.6.)

This will "compress" your color range to avoid both total black and total white,
using only the range 0.2 to 0.8 for each component.

Alternatively, you can use the clip() function to achieve the same color range,
but in this case black and almost-black will look alike:

  color rgbt <clip(<%R%>,0.2,0.8),clip(<%G%>,0.2,0.8),clip(<%B%>,0.2,0.8),<%A%>>


Post a reply to this message

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