POV-Ray : Newsgroups : povray.general : color conversion : Re: color conversion Server Time
29 Mar 2024 05:20:22 EDT (-0400)
  Re: color conversion  
From: Bald Eagle
Date: 3 Aug 2022 15:30:00
Message: <web.62eacca0938293031f9dae3025979125@news.povray.org>
"David Kraics" <bar### [at] aolcom> wrote:
> Hello. I need help with something. For years I believed that to convert a color
> from 255 scale to decimal, you just divide the rgb number by 255. But I've come
> to realize that isn't how to do it. I'm trying to convert a shade of green on a
> photo. The numbers weren't coming out right. I tested my method on colors in the
> colors.inc file and came out with different results. For instance, I reverse
> converted Gray50 (which is .5,.5,.5) and came up with 127.5. I rendered a block
> with the color, and then used Paint Shop Pro to grab the rgb color, from the
> produced picture, and it reported 177. I tried doing a google search for a
> converter, but they all wanted to convert the three rgb numbers into a single
> decimal number. So how do I convert RGB numbers into decimals to use in POV=ray?

Welcome to the wonderful world of srgb.  ;)

If you use srgb as a search term, I'm sure you'll find that many of us have
encountered this and beaten the subject very nearly to death.

https://news.povray.org/povray.general/thread/%3Cweb.60649d9bb9b7dccdd98418916e066e29%40news.povray.org%3E/?mtop=433484
&moff=32


Post a reply to this message

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