Skip to content

Commit

Permalink
fix lightness definition
Browse files Browse the repository at this point in the history
  • Loading branch information
bluej100 committed Dec 28, 2013
1 parent 8093684 commit 472240f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ module.exports = {
hueToRgb: function(h) {
h = h / 360 * 2 * Math.PI;
// legible lightness for small text on a white background
var l = 15;
var l = 45;
// chroma
var c = 50;
var lab = [45, c * Math.cos(h), c * Math.sin(h)];
var lab = [l, c * Math.cos(h), c * Math.sin(h)];
var xyz = converter.lab2xyz.apply(converter, lab);
var rgb = converter.xyz2rgb.apply(converter, xyz);
return rgb;
Expand Down

0 comments on commit 472240f

Please sign in to comment.