|
|
On 2024-05-01 10:05 (-4), Bald Eagle wrote:
>
> 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.
I can tell from that last peach color that there is no sRGB conversion
going on. <248, 203, 173> is the literal byte value of the swatch
encoded as sRGB, and <0.97, 0.8, 0.68> is straight division by 255. In
POV-Ray, srgb <248, 203, 173> / 255 should give you the same value as
eval_pigment(), which I predict will be rgb <0.939, 0.597, 0.418>. Try:
#local Tmp = srgb ExcelByteColor/255;
if(EvalPigmentColor = Tmp)
POV-Ray does not provide conversion back to sRGB, but if you need that,
I have some tools at https://github.com/CousinRicky/RC3-POV-Tools
Post a reply to this message
|
|