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 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 |
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 |
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
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
How it appears in the terminal:
% I want to use steel gray background color inside this paragraph