Lightweight (no dependencies) and fast color brightness detector built with Flow Types.
npm install chromatic-luminance



Lightweight (no dependencies) and fast color brightness detector based on the w3 documentation for color luminance: https://www.w3.org/TR/WCAG20/#relativeluminancedef. Answers question: dark-background -> use light text OR light-background -> use dark text.
yard add chromatic-luminance or npm install chromatic-luminance
/*
* Returns True/False if color is considered 'dark' or not by W3 luminance standards
* @param {color} can be shorthand hex (e.g. '#000'), normal hex (e.g. '#000000') or HTML named colors (e.g. 'black')
*/
default function isDark(color: string): boolean;
`Test
yarn test or npm run test`