15
rated 0 times
[
18]
[
3]
/ answers: 1 / hits: 25475
/ 14 Years ago, fri, august 6, 2010, 12:00:00
How do I convert HSB color to HSL?
Photoshop shows HSB color in its color picker. HSB color cannot be used in CSS, but HSL can.
I tried this JS:
function hsb2hsl(h, s, b) {
return {
h: h,
s: s,
l: b-s/2
}
}
But hsb2hsl(0, 100, 50).l == 0
instead of 25
Update: Can I do that without converting HSB → RGB → HSL?
More From » colors