POV-Ray : Newsgroups : povray.general : rgb color looks dark : Re: rgb color looks dark Server Time
30 Jul 2024 06:18:27 EDT (-0400)
  Re: rgb color looks dark  
From: clipka
Date: 11 Jul 2009 13:10:01
Message: <web.4a58c68cfb16eafe555c1690@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote:
> But when I want solid colors defined by rgb values, actual color rendered is too
> dark in comparison to what I see in Paint's color picker.

This is a Gamma problem: Paint shows you the actual values stored in the image
file, which are typically gamma-corrected for a display gamma of ~2.2, while
POV-Ray works with linear color values.

You need to gamma-"un-correct" the values from Paint before using them in
POV-Ray; the following code should do the job:

  color rgb <pow(R/255,GAMMA),pow(G/255,GAMMA),pow(B/255,GAMMA)>

Don't know by heart whether you need to use GAMMA=2.2 or GAMMA=1/2.2 though.


Post a reply to this message

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