RGB 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#
rgb(text, red, green, blue)
#
Prints full line of custom RGB-colored text.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text | str | Text to be printed with color. | required |
red | int | Number between | required |
green | int | Number between | required |
blue | int | Number between | required |
bg_rgb(text, red, green, blue)
#
Prints full line of text on custom RGB-colored background.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text | str | Text to be printed on colored background. | required |
red | int | Number between | required |
green | int | Number between | required |
blue | int | Number between | required |
Custom String Styling#
ColorRGB(red, green, blue)
#
Class for custom 16-bit RGB foreground text color.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
red | int | Number between | required |
green | int | Number between | required |
blue | int | Number between | required |
Example
How it appears in the terminal:
% I want to use DUSTY PINK color inside this paragraph
BgColorRGB(red, green, blue)
#
Class for custom 16-bit RGB background color instances.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
red | int | Number between | required |
green | int | Number between | required |
blue | int | Number between | required |
Example
How it appears in the terminal:
% I want to use STEEL BLUE background color inside this paragraph