Skip to content

@graphty/graphty-element / schema / toGrayscale

Function: toGrayscale() ​

toGrayscale(hex): string

Defined in: graphty-element/src/utils/styleHelpers/accessibility/colorblindSimulation.ts:117

Convert color to grayscale (luminance)

Parameters ​

hex ​

string

Input hex color string

Returns ​

string

Grayscale version of the color as hex string