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:20:56 EDT (-0400)
  Re: Comparing colors specified by byte-value using POV-Ray rgb  
From: Bald Eagle
Date: 1 May 2024 10:10:00
Message: <web.66324c3a88fdbe37e573981225979125@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:

> Not sure i understand your problem, but yes, eval_pigment does return a
> color triplet <red, green, blue> in [0..1] range.

So I fill cells in Excel, copy-paste them into IrfanView to make an image file,
and then POV-Ray looks at those pixels with eval_pigment.

When I'm looking for specific colors to determine if something is floor, wall,
door, etc, it's easy to use the 255 or 0 values and just divide by 255.

When I try it with that last peach color, using if(EvalPigmentColor =
ExcelByteColor/255), it doesn't work.


> An idea for your comparisons: turn your color into HSV.
> - Compare the wanted color with the H value plus/minus intervale (degrees).
> - Reject colors that are below a threshold of S and V.

It's an unwanted extra layer, but a good idea - I think the clarity of doing the
HSV way would simplify things.

Hopefully I'll have some time to try it all out tonight.

Thanks!

- BW


Post a reply to this message


Attachments:
Download 'excel rgb colors.png' (11 KB)

Preview of image 'excel rgb colors.png'
excel rgb colors.png


 

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