HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

oklch

Description

The oklch function for CSS specifies OK lightness, chroma, and hue.

Chroma maximum is unbounded but should not exceed 0.5 in practice.

ChannelLow UnitHigh UnitLow NumberHigh Number
l0.0%100.0%0.01.0
c0.0%100.0%0.00.4
h0.0deg360.0deg0.0360.0
a0.0%100.0%0.01.0

Syntax

CSS

oklch()

Values

<oklch()> =
    oklch(
        [ <percentage> | <number> | none ]
        [ <percentage> | <number> | none ]
        [ <hue> | none ]
        [ / [ <alpha-value> | none ] ]?
    )
<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<number>

An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.

none

Specifies a missing component.

<hue> =
    <number> |
    <angle>
<number>

An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.

<angle>

A number with a unit: deg (360 degrees in a full circle), grad (400 gradians in a full circle), rad (2π radians in a full circle), or turn (1 turn in a full circle).

<alpha-value> =
    <number> |
    <percentage>
<number>

An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Examples

1 · lch · unit

2 · lcha · unit

3 · lch · number

4 · lcha · number

5 · JS