Hex 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#
hex(text, hex) #
Prints full line of text in Hex color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed with color. | required |
hex | str | Hex color value with or without hashtag, for instance | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this text in coral Hex colors bg_hex(text, hex) #
Prints full line of text on colored background defined in Hex color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text | str | Text to be printed on colored background. | required |
hex | str | Hex color value with or without hashtag, for instance | required |
Example
1 2 3 | |
How it appears in the terminal:
% I want this background in coral Hex colors Custom String Styling#
ColorHex(hex)#
Class for custom foreground text defined in Hex color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hex | str | Hex color value with or without hashtag, for instance | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use WATERMELON RED color inside this paragraph BgColorHex(hex)#
Class for custom background defined in Hex color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hex | str | Hex color value with or without hashtag, for instance | required |
Example
1 2 3 4 5 | |
How it appears in the terminal:
% I want to use MINT GREEN background color inside this paragraph