visionmedia/rework — pull request #110 by jankuca (2013-09-03 01:40:32+00:00)
Title: add HSV/HSB to RGB function "hsb()"

There are two widely used cylindrical color representations—HSV and HSL. CSS3 only includes HSL but Adobe Photoshop uses HSV (often called HSB) which makes the model chosen for CSS3 pretty much useless for coders.

The added `hsb(hue, saturation, value)` function converts HSV (Photoshop) values to RGB.

button {
background-color: hsb(220, 43%, 30%);
background-color: hsb(220deg, .43, 0.3);
}

It uses `parseInt` and `parseFloat` which makes it possible to use arbitrary suffixes such as `deg` or `%`. The hue is always parsed using `parseInt` while the two 0–100 values are parsed either as ints or as floats depending on whether they end with a percentage sign (int) or not (float).