Grayscale Contrast Luminance Ratio Calculator

PhysicalLINEARluminanceratioLbright/Ldark,noWCAG.05offset,sRGBgamma/rendering/colorconversion;dark0infiniteundefinedratio rejected. Actual independently applicable flag/cloth/manufacturer/jurisdiction/protocol/sourceedition,units/calibration and observations external;not legal/display precedence,authenticity,visibility or structural safety approval.

Description

A physical grayscale luminance ratio compares brighter and darker linear measurements.

A physical grayscale luminance ratio compares brighter and darker linear measurements.1

Both need the same measurement basis; an encoded RGB value is not already a linear luminance measurement.

When to use Grayscale Contrast Luminance Ratio Calculator

Use this tool to apply the stated grayscale contrast luminance ratio calculator operation with an explicit input and unit basis.

How to use Grayscale Contrast Luminance Ratio Calculator and how it works

  1. Establish the measurement basis and units described above.
  2. Enter actualFirstLinearGrayscaleLuminance, actualSecondLinearGrayscaleLuminance and run the tool.
  3. Read result.value using the output meanings below.
  4. If input is rejected, correct the stated type, range, ordering or alignment issue and rerun; review successful results under the declared convention.
Input fieldMeaningValue typeRequirement
actualFirstLinearGrayscaleLuminanceFirst linear grayscale luminance, on the basis specified in the algorithm.numberrequired; finite; strictly positive; further conditions in the algorithm
actualSecondLinearGrayscaleLuminanceSecond linear grayscale luminance, on the basis specified in the algorithm.numberrequired; finite; strictly positive; further conditions in the algorithm

Require two positive linear luminances. Divide the larger by the smaller; zero darkness is rejected because it would yield an unbounded ratio.

ratio = max(L₁,L₂) / min(L₁,L₂)

Apply the declared units, ordering and branch conditions.

Output fieldMeaningValue type
resultObject containing the declared output fields.object
result.valueDimensionless brighter/darker linear luminance ratio.number
json
{
  "input": {
    "actualFirstLinearGrayscaleLuminance": 2,
    "actualSecondLinearGrayscaleLuminance": 1
  },
  "output": {
    "result": {
      "value": 2
    }
  }
}

Limitations and assumptions

The output applies the declared operation to the values you supply. Establish the measurement basis, units, coefficients and any caller-selected rules before interpreting it. The tool does not independently collect or verify observations or decide whether a model or reference applies.

Supply explicit required fields with the documented types and dense aligned arrays. Unknown fields, wrong types and nonfinite numbers are rejected. Branch-specific constraints are explained above. A successful false boolean, negative signed difference, empty slice or unresolved tie is distinct from an input error. Very large inputs or outputs may be rejected by shared resource limits.

Alternative or Complementary methods

For a related operation, use Text Legibility Distance Multiplier Calculator. Letter height and viewing distance can be related by a factor established for particular visual conditions.

For a related operation, use Letter Height Minimum Rule Checker. A lettering rule can be checked once its applicable minimum height has been established.

References

  1. Grayscale Contrast Luminance Ratio Calculator — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies