gka / chroma.js

JavaScript library for all kinds of color manipulations
https://gka.github.io/chroma.js/
Other
10.08k stars 543 forks source link

Typing for `.hsl()` is wrong #272

Open GMaiolo opened 3 years ago

GMaiolo commented 3 years ago

The current type for the .hsl() method is the following:

interface ColorSpaces {
    ...
    hsl: [number, number, number];
}

But according to the docs and the actual result, the method returns 4 numbers, including the alpha.

The actual type should be:

[number, number, number, number]