Proposing a different technique

Name: Eric Cole
Email: eric.cole@nike.com
Affiliation: 
Document: TD
Item Number: G18
Part of Item: Related Techniques
Comment Type: technical
Summary of Issue: Proposing a different technique
Comment (Including rationale for any proposed change):
This comment applies to both G17 and G18

Ratio based measures of contrast:
Imply a medium luminance that shifts with the ratio.
May have an ambiguous range of luminances.
Are curved in display space which is unintuitive.
Are asymmetrical with dark and light colors.

The shifting medium luminance is the biggest problem with ratio based contrast. There will be some colors that one ratio would place against black for best contrast and a different ratio would place against white for best contrast.


Proposed Change:
The current technique in G17 and G18 for computing a ratio, using approximated transfer function, all components in 0 ... 1:

luminance = (R²·², G²·², B²·²) • (0.2126, 0.7152 , 0.0722)
ratio = (max(luminance1, luminance2) + 0.05) / (min(luminance1, luminance2) + 0.05)

I suggest the following method for computing a difference, using approximated transfer functions

luminance = (R²·², G²·², B²·²) • (0.2126, 0.7152 , 0.0722)
luma = luminance⁰·⁴⁵
difference = |luma1 - luma2|

A ratio of 4.5 is roughly equivalent to a difference of 0.5, and a ratio of 7.0 is roughly equivalent to a difference of 0.6.

Difference based measures of contrast:
Specify a constant medium luminance at medium gray.
Have no ambiguous luminances.
Are linear in display space which is more intuitive.
Are symmetrical around medium in display space.

This is a graph of both ratio and difference based contrast, using the full transfer functions:
https://www.desmos.com/calculator/bwj0u6c7um

Roughly speaking, the suggested luminances for a given input vary by less than 3% between the two methods.  For 97% of colors, there is no difference between the methods.

The biggest benefit of difference based contrast is the linearity in display space.  A difference in luma of 50% or 60% is easier to work with than a luminance ratio of 4.5 or 7.0.

Received on Monday, 5 April 2021 18:26:01 UTC