POV-Ray : Newsgroups : povray.advanced-users : Comparing colors specified by byte-value using POV-Ray rgb : Re: Comparing colors specified by byte-value using POV-Ray rgb Server Time
1 Jun 2024 13:29:12 EDT (-0400)
  Re: Comparing colors specified by byte-value using POV-Ray rgb  
From: Bald Eagle
Date: 1 May 2024 13:35:00
Message: <web.66327d1988fdbe37e573981225979125@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:

> I quickly coded a test. The result (of little interest) is attached, but
> I think the problem lies in the precision/tolerance of the calculations.

Yes, that's what I was thinking as well.


> I created this macro, which compares the source color with the chosen
> color, introducing a "tolerance" variable :

That's indeed the kind of thing I was looking for.

> If the color is close to the one defined, I make a higher box:

So you are definitely recognizing the peach color separately from the other
colors.

I'm wondering what it would look like if you took Ricky's advice and expressed
the eval_pigment results as both rgb and srgb-converted values and used those
for your comparison, and output the results to the #debug stream.

(And I still like your HSV idea - I definitely think it's more intuitive and
versatile for how I'll be using color coded information)

- BW


Post a reply to this message

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