Closed bennlich closed 11 years ago
Good enough to start with HSL. More common than HSV iirc, Would you mind to change it to take range 0..255 instead of 0..1? Should be simple :-)
Sure thing. Although 0-255 is sort of an uncommon range for HSL. H is usually 0-360, and S and L are usually 0-1, as far as I know. Do you think it should support H from 0-255 or 0-360? We could also support %'s like in css: http://www.w3.org/TR/2003/CR-css3-color-20030514/#hsla-color.
On Thu, Apr 18, 2013 at 6:07 AM, Jan Marsch notifications@github.comwrote:
Good enough to start with HSL. More common than HSV iirc, Would you mind to change it to take range 0..255 instead of 0..1? Should be simple :-)
— Reply to this email directly or view it on GitHubhttps://github.com/kekscom/osmbuildings/pull/31#issuecomment-16575204 .
Totally valid. I was blinded by RGB ranges. I'm fine with H: 0..360 and S,L: 0%..100% or 0..1. Not sure about the percent value, but I slightly prefer the latter as alpha is also 0..1 It could be totally flexible but thats probably a bit too much then.
I went with H 0-360, S 0-1, L 0-1. The percentages thing is weird, especially since alpha isn't usually provided as a percentage. Eventually it might be nice to be totally flexible though, like you mentioned.
:+1:
Added support for hsla colors in geojson properties, like
wallColor: hsl(0.5,1,0.5)
. Note that h, s, l, and a should all be between 0 and 1.HSL is similar to HSV (https://github.com/kekscom/osmbuildings/issues/30) but not identical.