@fantasy-color/contrast-ratio-luminance
v2.1.0
Published
Calculate the contrast ratio of two relative luminances
Downloads
10
Keywords
Readme
@fantasy-color/contrast-ratio-luminance
Calculate the contrast ratio between two relative luminances
type contrastRatioLuminance = (luminance1: number, luminance2: number) => number
Example usage:
import contrastRatioLuminance from '@fantasy-color/contrast-ratio-luminance'
contrastRatioLuminance(0.5, 0.8)
// > 1.5454545454545454