Skip to content

Commit

Permalink
darken and increase saturation
Browse files Browse the repository at this point in the history
  • Loading branch information
bluej100 committed Dec 28, 2013
1 parent 472240f commit afa120a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "color-slicer",
"version": "0.2.0",
"version": "0.3.0",
"authors": [
"Braden Anderson <[email protected]>"
],
Expand Down
6 changes: 3 additions & 3 deletions dist/color-slicer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,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 = 40;
// chroma
var c = 50;
var lab = [45, c * Math.cos(h), c * Math.sin(h)];
var c = 80;
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
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = {
hueToRgb: function(h) {
h = h / 360 * 2 * Math.PI;
// legible lightness for small text on a white background
var l = 45;
var l = 40;
// chroma
var c = 50;
var c = 80;
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);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "color-slicer",
"version": "0.2.0",
"version": "0.3.0",
"description": "Generate lists of readable text colors.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit afa120a

Please sign in to comment.