@graphty/graphty-element / schema / areDistinguishableInGrayscale
Function: areDistinguishableInGrayscale() ​
areDistinguishableInGrayscale(
hex1,hex2,threshold?):boolean
Defined in: graphty-element/src/utils/styleHelpers/accessibility/colorblindSimulation.ts:158
Check if two colors are distinguishable in grayscale Useful for print-friendliness testing
Parameters ​
hex1 ​
string
First hex color string to compare
hex2 ​
string
Second hex color string to compare
threshold? ​
number = 10
Minimum difference threshold for distinguishability (default: 10)
Returns ​
boolean
True if colors are distinguishable in grayscale