chroma.js get text color based on background color code example
Example: chroma js contrast check
// contrast smaller than 4.5 = too lowchroma.contrast('pink', 'hotpink');// contrast greater than 4.5 = high enoughchroma.contrast('pink', 'purple');1.7216.124