Minor bug found with Colour

Hi all,

If you draw something with Graphics, and use a colour with components > 1.0 you get random colours drawn. (which change/flicker between repaints)

maybe a nice clamp to white in the engine would be cool.

It’s probably uncommon for people to use HDR colours, but i’m working with various spectral and XYZ -> RGB colourspaces in my juce app i’m developing, and it’s a pain to debug things sometimes.


Thanks, I should probably clamp those values in the Colour class.

Please don’t clamp right off the bat! Clamping right at the rasterizing stage is better.


The Colour class doesn’t hold floats, it’s 8-bit ARGB, so out of range values just initialise it with junk. Clamping at least stops that happening.