colored

colored(
    text: object,
    color: Color | None = None,
    on_color: Highlight | None = None,
    attrs: Iterable[Attribute] | None = None,
    *,
    no_color: bool | None = None,
    force_color: bool | None = None
) -> str

Colorize text.
Available text colors:
black, red, green, yellow, blue, magenta, cyan, white, light_grey, dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan.
Available text highlights:
on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white, on_light_grey, on_dark_grey, on_light_red, on_light_green, on_light_yellow, on_light_blue, on_light_magenta, on_light_cyan.
Available attributes:
bold, dark, underline, blink, reverse, concealed.
Example:
colored(‘Hello, World!’, ‘red’, ‘on_black’, [‘bold’, ‘blink’]) colored(‘Hello, World!’, ‘green’)

Parameters:
NameDescription
textType: object
colorType: Color | None

Default: None
on_colorType: Highlight | None

Default: None
attrsType: Iterable[Attribute] | None

Default: None
no_colorType: bool | None

Default: None
force_colorType: bool | None

Default: None