Skip to content

Commit

Permalink
Use power of two as a step for ranges approximator
Browse files Browse the repository at this point in the history
  • Loading branch information
devgru committed Jan 1, 2024
1 parent 3091a6b commit d58dd0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/ranges.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { converter, getMode } from '../src/index.js';
for a particular color space, by converting lots of
RGB colors to that space.
*/
let ranges = (mode, step = 0.01) => {
let ranges = (mode, step = 1 / 128) => {
let conv = converter(mode);
let chs = getMode(mode).channels;
let res = chs.reduce(
Expand All @@ -32,4 +32,4 @@ let ranges = (mode, step = 0.01) => {
return res;
};

console.log(ranges(process.argv[2], 0.0025));
console.log(ranges(process.argv[2], 1 / 512));

0 comments on commit d58dd0a

Please sign in to comment.