Contrast ratios can range from 1 to 21, usually written as 1:1 to 21:1. The formula for this measurement is (L1 + 0.05) / (L2 + 0.05), where L1 refers to the luminance of lighter colors and L2 is the luminance of the darker colors.