HSV (or, as I've more often heard it, HSL - Hue/Saturation/Lightness) might be an option later on, but for now the arithmetic is limited to arithmetical operators: +, -, *, /, and %. All operations between colors and integers are performed piecewise, so for example
#00f + 25 => #2525ff #04A * 3 => #00ccff Most basic color operations like lightening, saturating, or even mixing (#fff / 2 + #00f / 2 => #7f7ffe) can be approximated with basic arithmetic. - Nathan weepy wrote: > hmmm arithmatic with colors ? > > It would be great to have some color operations > > e.g. > > lighten(#00F, 25) => #DDF > lighten(#00F, -25) => #00A > > saturate(#00A, 25) => #00F > saturate(#00A, -25) => #338 > > mix(#FFF, #00F, 10) => #EEF > > I'm just guessing here about the syntax and also guessing the values ! > This needs to find some code to do the RGB ---> HSV and back. > Which makes me wonder whether it would be useful to be able to express > colors in hsv ? hsv(10,100,20). > > weepy > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
