⚖️ Calculates the contrast ratio between two colors.
Syntax
import { colorContrast } from '@opentf/std';
colorContrast(color1: any, color2: any): numberReturns a value between 1 and 21.
Examples
colorContrast('white', 'black'); //=> 21
colorContrast('white', 'white'); //=> 1
colorContrast('red', 'white'); //=> 4