POV-Ray : Newsgroups : povray.advanced-users : Color conversion : Re: Color conversion Server Time
19 Apr 2024 00:17:18 EDT (-0400)
  Re: Color conversion  
From: Ive
Date: 10 Nov 2009 13:50:22
Message: <4af9b5ee$1@news.povray.org>
SharkD wrote:
> I looked at lightsys, and is this all I need to do to convert the colors?
> 
>   color rgb MapGamut(xyz2RGB(ChromaMatchSource(xyY2xyz(coo_xyY))))
> 

Yes ;) but don't forget to scale the Y to 0.0 - 1.0 range before feeding 
it in. The returned rgb values are not gamma corrected and are in scRGB 
color space when CIE.inc is used with the default settings.

For your original question about gamut mapping you can use the macro 
CIE_GamutMapping(MAPPING_FUNCTION) where MAPPING_FUNCTION can be
0 - no mapping, keep negative values
1 - clip negative values
2 - triangle intersection
3 - desaturation


-Ive


Post a reply to this message

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