Palettes Functions
Available functions:
ColorPalette.__init__(base_color)
: Initializes the color palette with a base color.ColorPalette.
generate_complementary
()
: Generates a complementary color palette.ColorPalette.
generate_analogous
(angle=30)
: Generates an analogous color palette.ColorPalette.
generate_triadic
()
: Generates a triadic color palette.ColorPalette.
generate_tetradic
()
: Generates a tetradic color palette.ColorPalette.
generate_square
()
: Generates a square color palette.ColorPalette.
generate_split_complementary
()
: Generates a split-complementary color palette.ColorPalette.
generate_monochromatic
(shades=24)
: Generates a monochromatic color palette with varying lightness.ColorPalette.
palette_to_hex
()
: Converts the RGB palette to HEX format.ColorPalette.
generate_random_palette
()
: Generates a random base color and its associated palettes.ColorPalette.
generate_random_color
()
: Generates a random RGB color and converts it to HEX and HSL formats.ColorPalette.
generate_random_hex_colors
(n=10)
: Generates a list of random colors in HEX format.
To use ColorPalette, you must first initialize it with a base color (RGB tuple) before use:
This, however, is not needed when using for random generation, you can init with a default RGB color of (0,0,0)
, which is black.
Generate complementary
Generates a complementary color palette.
Generate analogous
Generates an analogous color palette.
angle
represents how close the color values are to each other. You can lower the angle to say 15, for closer colors to that of the base color, or even increase it for colors that are still analogous in a sense, but further away.
Generate triadic
Generates a triadic color palette.
Generate tetradic
Generates a tetradic color palette.
Generate square
Generates a square color palette.
Generate split-complementary
Generates a split-complementary color palette.
Generate monochromatic
Generates a monochromatic color palette.
Palette to HEX
Converts the RGB palette to HEX format.
Generate random palette
Generates a random base color and its associated palettes.
Generate random color
Generates a random RGB color and converts it to HEX and HSL formats.
Generate random HEX colors
Generates a list of random colors in HEX format.
We chose to add a batch HEX color generate function just for accessibility since HEX is popular, but you can quickly convert the colors to other formats as well.
Last updated