POV-Ray : Newsgroups : povray.binaries.images : Colour Interpolation in various colour spaces : Re: Colour Interpolation in various colour spaces Server Time
30 Jul 2024 20:21:50 EDT (-0400)
  Re: Colour Interpolation in various colour spaces  
From: clipka
Date: 19 Jan 2011 03:23:18
Message: <4d369f76$1@news.povray.org>
After a long, long time of toying around with various colour spaces 
(even including Munsell), I've come to the conclusion that none of them 
really fit the needs for creation of perceptually uniform gradients: 
Those which are ok for brightness gradients invariably seem to be 
problematic with gradients between different colours (sometimes for 
particular combos, sometimes in general), and vice versa.

So far the best interpolation method I've been able to come up with (and 
one which I think does give sufficiently good results for all gradients) 
is as follows:

- Interpolate colors in linear RGB color space

- Independently, interpolate brightness (Y) in non-linear space, e.g.

   Y_interpolated = [ ( Y_1 ^0.4 ) + ( Y_2 ^0.4 ) ] ^2.5

- In linear RGB color space, brightness-adjust interpolated color to 
match the interpolated brightness, i.e.

   (R',G',B') = (R,G,B) * ( Y_interpolated / Y(R,G,B) )


Post a reply to this message

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