I have been given a theme from a designer, and that theme has a primary colour from which other colours are generated (simply shades of the main colour).
I need to allow my end user to change the main colour, and have all the rest of the colours be built up from that.
My question, then, is two fold. Firstly, what is the best way to address obtaining the mathamatical differences between the colours and the base?
Secondly, is their a good way to implement it. It will need to be part of a Rails 3 application, and there are a few gems available for CSS preprocessing. Are any of them geared up for this sort of work?
The best way is to use a HSL model, since that model is a lineary perceptual model. So you may have to convert the (hexadecimal?) color value to HSL first.
CSS does support HSL
Update: If you are using Sass, this is even easier.