Mingye Wang

Results 347 comments of Mingye Wang

Sized based check is very useful — most dup finders like jdupes do that. For the recheck I suggest trying a faster cryptographic hash like the BLAKE2/3 family: good does...

The hex-string is defined in the same way as web-colors, so sRGB (0-255). Everything "RGB" here is sRGB clipped to sRGB 0-255, in fact. Interpolating, mixing, and blending have their...

* There is no single CMY color space; any combination of ink, process, and paper creates a new one. * Going from RGB to any particular CMY(K) color space is...

That said, since there is support for a very naive version of CMYK, it only makes sense to make an equally naive version of CMY or to remove them both....

For a quick fix, `src/io/hsl/index.js` should be unpacking as 'hsla' like the 'rgba' one in `src/io/rgb.index.js` is doing. I do wonder whether alpha support should be refactored as a general-purpose...

I am pretty sure the issue should go to the people at DefinitelyTyped.

Have you tried just printing out what's in `chroma`? 1. Let `1.mjs` be `import * as chroma from "chroma-js"; console.log(chroma)` 2. Run `node --experimental-modules --es-module-specifier-resolution=node 1.mjs`. You will see that...

Won't this do? ```js var chroma = require("chroma-js") function asArray(a, mode='rgb') { return Array.isArray(a) ? a : chroma(a)[mode]() } /** Per-element arithmetic */ function colorArith(a, b, f, mode='rgb') { const...

Isn't that just ```JS function closest(needle, haystack) { return haystack .map((straw) => [chroma.distance(needle, straw), straw]) // become [distance, color] .sort((a, b) => a[0]-b[0]))[0][1] // pick first (closest), pick the color...

This is really Google's fault, and.. Google does have a "Closure Compiler" thingy that transcompiles to ES3.