accessiplot.detection.contrast_ratio.normalize
- accessiplot.detection.contrast_ratio.normalize(primary_color: float)[source]
Normalize the , G, or B value using the WCAG 2.0 formula defined for calculating the relative luminance.
- Parameters:
- primary_color: float
Value for r, g, or b in the scaled in the range [0,1]
- Returns:
- normalized_color: float
Normalizes the value based on if it is >0.03928 or not.
References