You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeHSX=[number,number,number];/** * function hsv2hsl * @param h {Number} hue value 0...360 * @param s {Number} saturation 0...1 * @param v {Number} value 0...1 * @returns {Array} h:0...360 s:0...1 l:0...1 */exportconsthsv2hsl=(h: number,s: number,v: number,l: number=v-(v*s)/2,m=Math.min(l,1-l)): HSX=>{if(h<0||h>360){thrownewError(`hsv2hsl() hue parameter is expected to be a number between 0 and 360, \`${h}\` given.`);}// ...return[h,m ? (v-l)/m : 0,l];};
The text was updated successfully, but these errors were encountered:
i might do that for the HSV2HSL function but the main one does not really have max and min's. But it might be practical to do something like that: https://github.com/bit101/quicksettings
For example:
The text was updated successfully, but these errors were encountered: