HSB vs HSL vs HSV

Is HSB same as HSL? No. HSB is the same as HSV, but HSL is different. All these are used as a friendly way to represent RGB colors. The Wikipedia article on HSL an HSV explains the differences using color cylinders: HSL and HSV. Basically, Hue is the same for HSB and HSL but the …

Read more

CSS: lighten an element on hover

It’s a long time ago but you can do something like this: .element { background-color: red; } .element:hover { box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1); } You can change the 100px into a number you want. I took a large one to cover the whole element. It isn’t a very beautiful …

Read more

RGB to HSL conversion

I’ve been reading several wiki pages and checking different calculations, and creating visualizations of RGB cube projection onto a hexagon. And I’d like to post my understanding of this conversion. Since I find this conversion (representations of color models using geometric shapes) interesting, I’ll try to be as thorough as I can be. First, let’s …

Read more

HSL to RGB color conversion

Garry Tan posted a Javascript solution on his blog (which he attributes to a now defunct mjijackson.com, but is archived here and the original author has a gist – thanks to user2441511). The code is re-posted below: HSL to RGB: /** * Converts an HSL color value to RGB. Conversion formula * adapted from http://en.wikipedia.org/wiki/HSL_color_space. …

Read more