DEFINITIONS:
- CONTRAST: At the most basic, contrast is a defined relationship between two stimuli. But WHAT relationship and HOW derived is a subject that can take a couple chapters in a textbook to describe. If you want more, Google Weber Contrast, Michelson Contrast, and CIELAB Difference.
- Brightness is a perception, not a measure.
- Human perception is nonlinear relative to light, and also to spectral intensities.
- Luminance is a LINEAR measure of LIGHT, spectrally weighted. It is either relative Y (0-1 as in Y from CIEXYZ) or absolute L, as in 100 cd/m2.
- Perceptual Lightness is a non-linear measure of light, but is intended as "perceptually uniform" i.e. linear in regards to perception.
L* (Lstar, not to be confused with L for Linear Luminance) from CIELAB (Lab*) is one such measure of perceptual lightness.
- Gamma: A curve used to encode image information to take best advantage of a given data space, taking advantage of the non linear aspect of human perception.
- Perfect black: there is no such thing, especially not in a monitor that is turned on. But if you want to discuss "theoretical black" then okay.
PAINT IT BLACK
In a real world environment, the actual "black" level (#000) including modest flare will typically be around 1 cd/m2, at least that's a good approximation for most purposes.
But if your question is, what is the luminance of #010101 if #FFF = 100 cd/m2?
In that case, #010101 = 0.0303526983548837 cd/m^2. If you use the piecewise sRGB linearization, as discussed in this answer I posted on StackOverflow.
However, monitors more typically use a more "pure" gamma function. And it's not necessarily 2.2 - it's how you have ADJUSTED it. But we'll go with 2.2 for maths sake. In the case of a simple 2.2 gamma, and the imaginary "perfect black" then:
#010101 = 0.000507705190066176 cd/m^2
The Contrasts:
Using the sRGB piecewise maths: YLo=(1/255)/12.92
As this is normalized for 0-1, multiply by 100, i.e. YLo=((1/255)/12.92)*100
For YHi = 100.0 & YLo = 0.0303526983548837 Then:
- Simple Ratio (YHi / YLo): 3294.6:1
- Weber Contrast ((YHi - YLo) / YHi): 99.9696473016451%
- Michelson Contrast ((YHi - YLo) / (YHi + YLo)): 99.9393130234252%
Using the simple 2.2 gamma maths: YLo=(1/255)2.2
As this is normalized for 0-1, multiply by 100, i.e. YLo=((1/255)2.2)*100
For YHi = 100.0 & YLo = 0.000507705190066176 Then:
- Simple Ratio (YHi / YLo): 196964.699:1
- Weber Contrast ((YHi - YLo) / YHi): 99.9994922948099%
- Michelson Contrast ((YHi - YLo) / (YHi + YLo)): 99.9989845947751%
(There's a potential rounding error difference of ~0.000000000030352698380 depending on if you use the rounded coefficients).