HSL color space in Inkscape versus those in html5 and css3
HSL color space in Inkscape versus those in html5 and css3
Hi, in the application of HSL space in Inkscape's "fill and stroke" , hue, saturation and light are all represented by values between 0 and 255; while in html5 canvas http://www.w3schools.com/cssref/css_colors_legal.asp and css3 (http://www.w3.org/TR/css3-color/#hsl-color), hue is represented as an angle of the color circle (i.e. 359 hues in 360 degrees), saturation and lightness are represented as percentages. Is Inkscape HSL color space the same one as those specified in.html
Re: HSL color space in Inkscape versus those in html5 and cs
AFAIK inkscape won't store the value in HSL (but in RGB)
The color palette widget let you express your color in HSL but it will convert it on the fly in RGB.
The widget uses 256 values (from 0 to 255) for hue.
So if you want to convert a html5 hue to an inkscape one, you got to multiply the html5 value by 255/359 (and 359/255 the other way around)
Same goes for S & L
Multiply by 255/100 (or 100/255)
The color palette widget let you express your color in HSL but it will convert it on the fly in RGB.
The widget uses 256 values (from 0 to 255) for hue.
So if you want to convert a html5 hue to an inkscape one, you got to multiply the html5 value by 255/359 (and 359/255 the other way around)
Same goes for S & L
Multiply by 255/100 (or 100/255)