Skip to content

Colors API

This section contains the API reference for Colors sub-module.


get_material_color

Returns a dictionary of all shades of a material color

get_material_color(color: str)

Parameters:

Returns:

  • dict | None: A dictionary of corresponding color shades if found, otherwise None

get_web_colors

Yields color dicts from web color list.

get_web_colors()

Returns:

  • Generator[Dict]: A generator that yields HTML Colors in a dictionary on each iteration.

get_palettes

Yields predefined color palettes.

get_palettes()

Returns:

  • Generator[List[str]]: A generator that yields a predefined color palette as a list on each iteration.

get_random_palette

Get a random palette from all predefined colors palettes.

get_random_palette()

Returns:

  • List[str]: A predefined color palette. (list of hex colors)