compareHEXColorsViaHSL()
function compareHEXColorsViaHSL(
color1,
color2,
tolerance): boolean
Compares two hex colors via HSL
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
color1 | `#${string}` | undefined | The first hex color |
color2 | `#${string}` | undefined | The second hex color |
tolerance | number | 10 | The tolerance for the comparison |
Returns
boolean
True if the colors are similar, false otherwise
Example
compareHEXColorsViaHSL('#FF0000', '#00FF00'); // false