OKLCH Colors#
Disclaimer
Not all terminals support 24-bit colors in RGB, HSL, Hex, or OKLCH. If your terminal does support such advanced colors, read on.
Full Line Text Functions#
oklch(text, lightness, chroma, hue) #
Prints full line of custom OKLCH-colored text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed on colored background. | required |
lightness | float | Lightness value between | required |
chroma | float | Chroma value between | required |
hue | float | Number between | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this text in orange OKLCH colors bg_oklch(text, lightness, chroma, hue) #
Prints full line of text on custom OKLCH-colored background.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed on colored background. | required |
lightness | float | Lightness value between | required |
chroma | float | Chroma value between | required |
hue | float | Number between | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this background in green OKLCH colors Custom String Styling#
ColorOKLCH(lightness, chroma, hue)#
Class for custom OKLCH foreground text color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lightness | float | Lightness value between | required |
chroma | float | Chroma value between | required |
hue | float | Number between | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use DUSTY ORANGE foreground color inside this paragraph BgColorOKLCH(lightness, chroma, hue)#
Class for custom OKLCH background color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lightness | float | Lightness value between | required |
chroma | float | Chroma value between | required |
hue | float | Number between | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use BASIL GREEN background color inside this paragraph