HSL Colors#
Disclaimer
Not all terminals support 24-bit colors in RGB, HSL, or Hex. If your terminal does support such advanced colors, read on.
Full Line Text Functions#
hsl(text, hue, saturation, lightness) #
Prints full line of custom HSL-colored text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed on colored background. | required |
hue | float | Number between | required |
saturation | float | Percentage between | required |
lightness | float | Percentage between | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this text in green HSL colors bg_hsl(text, hue, saturation, lightness) #
Prints full line of text on custom HSL-colored background.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed on colored background. | required |
hue | float | Number between | required |
saturation | float | Percentage between | required |
lightness | float | Percentage between | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this background in green HSL colors Custom String Styling#
ColorHSL(hue, saturation, lightness)#
Class for custom HSL foreground text color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hue | float | Number between | required |
saturation | float | Percentage between | required |
lightness | float | Percentage between | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use MUSTARD GREEN color inside this paragraph BgColorHSL(hue, saturation, lightness)#
Class for custom HSL background color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hue | float | Number between | required |
saturation | float | Percentage between | required |
lightness | float | Percentage between | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use STEEL GRAY background color inside this paragraph