hey jules, i was just wondering about the colour modification functions.

there is the really useful ‘brighter’ function, but is there a recommended equivalent for saturation? i think ’

int oldSat = colour.getSaturation();
colour = colour.withSaturation(oldSat + satTweak);

would this do pretty much the right thing? something’s confusing me about the way it’s behaving at the moment but i daren’t concentrate on it too much today - two assignments due in on friday and i was up ALL night last night coding away :hihi: foolish boy…

also, there doesn’t seem to be anything in the documentation about how to use withRotatedHue(); specifically the limits of the parameter. how much does one need to rotate the hue? is it something like a 0-1 for a full rotation? or in degrees? and is it simple enough to say

colour = colour.withRotatedHue(amount);


sorry for the stupid questions :oops:

it’s got the withMultipliedSaturation() method, which sounds like what you’re after…

the hue rotation thing just adds the value to the hue, and then modulo’s the result to keep it between 0 and 1

cheers jules. i haven’t even bothered to look into the source code until now, but i’m just taking a look to see the implementation… which is what i should’ve done in the first place :hihi:

it’s refreshing to see a library that’s easy to read! :o

this is probably the single greatest thing ever to happen to programming. :slight_smile: for me it is anyway