Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Oct 13, 2024
1 parent c5393d5 commit 4cf0d93
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/chroma-light.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
};

// this gets updated automatically
var version = '3.1.1';
var version = '3.1.2';

var chroma = function () {
var args = [], len = arguments.length;
Expand Down
2 changes: 1 addition & 1 deletion dist/chroma-light.min.cjs

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions dist/chroma.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@
var DEG2RAD = PI$2 / 180;
var RAD2DEG = 180 / PI$2;

/**
* Reverse the first three elements of an array
*
* @param {any[]} arr
* @returns {any[]}
*/
function reverse3(arr) {
return arr.slice(0, 3).reverse().concat( arr.slice(3));
}

var input = {
format: {},
autodetect: []
Expand Down Expand Up @@ -198,7 +208,7 @@
};

// this gets updated automatically
var version = '3.1.1';
var version = '3.1.2';

var chroma = function () {
var args = [], len = arguments.length;
Expand Down Expand Up @@ -1872,15 +1882,15 @@
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];

var hcl = unpack(args, 'hcl').reverse();
var hcl = reverse3(unpack(args, 'hcl'));
return lch2rgb.apply(void 0, hcl);
};

Color.prototype.lch = function () {
return rgb2lch(this._rgb);
};
Color.prototype.hcl = function () {
return rgb2lch(this._rgb).reverse();
return reverse3(rgb2lch(this._rgb));
};

var lch$1 = function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/chroma.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/libs/chroma-light.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
};

// this gets updated automatically
var version = '3.1.1';
var version = '3.1.2';

var chroma = function () {
var args = [], len = arguments.length;
Expand Down
2 changes: 1 addition & 1 deletion docs/libs/chroma-light.min.cjs

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions docs/libs/chroma.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@
var DEG2RAD = PI$2 / 180;
var RAD2DEG = 180 / PI$2;

/**
* Reverse the first three elements of an array
*
* @param {any[]} arr
* @returns {any[]}
*/
function reverse3(arr) {
return arr.slice(0, 3).reverse().concat( arr.slice(3));
}

var input = {
format: {},
autodetect: []
Expand Down Expand Up @@ -198,7 +208,7 @@
};

// this gets updated automatically
var version = '3.1.1';
var version = '3.1.2';

var chroma = function () {
var args = [], len = arguments.length;
Expand Down Expand Up @@ -1872,15 +1882,15 @@
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];

var hcl = unpack(args, 'hcl').reverse();
var hcl = reverse3(unpack(args, 'hcl'));
return lch2rgb.apply(void 0, hcl);
};

Color.prototype.lch = function () {
return rgb2lch(this._rgb);
};
Color.prototype.hcl = function () {
return rgb2lch(this._rgb).reverse();
return reverse3(rgb2lch(this._rgb));
};

var lch$1 = function () {
Expand Down
4 changes: 2 additions & 2 deletions docs/libs/chroma.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// this gets updated automatically
export const version = '3.1.1';
export const version = '3.1.2';

0 comments on commit 4cf0d93

Please sign in to comment.