Skip to main content

Module palette

Module palette 

Expand description

Define the colors of a theme.

Structs§

Background
A set of background colors.
Pair
A pair of background and text colors.
Palette
An extended set of colors generated from a Seed.
Seed
The base set of colors of a Palette.
Swatch
A color sample in a palette of colors.

Statics§

CATPPUCCIN_FRAPPE
The built-in Catppuccin Frappé variant of a Palette.
CATPPUCCIN_LATTE
The built-in Catppuccin Latte variant of a Palette.
CATPPUCCIN_MACCHIATO
The built-in Catppuccin Macchiato variant of a Palette.
CATPPUCCIN_MOCHA
The built-in Catppuccin Mocha variant of a Palette.
DARK
The built-in dark variant of a Palette.
DRACULA
The built-in Dracula variant of a Palette.
FERRA
The built-in Ferra variant of a Palette.
GRUVBOX_DARK
The built-in Gruvbox Dark variant of a Palette.
GRUVBOX_LIGHT
The built-in Gruvbox Light variant of a Palette.
KANAGAWA_DRAGON
The built-in Kanagawa Dragon variant of a Palette.
KANAGAWA_LOTUS
The built-in Kanagawa Lotus variant of a Palette.
KANAGAWA_WAVE
The built-in Kanagawa Wave variant of a Palette.
LIGHT
The built-in light variant of a Palette.
MOONFLY
The built-in Moonfly variant of a Palette.
NIGHTFLY
The built-in Nightfly variant of a Palette.
NORD
The built-in Nord variant of a Palette.
OXOCARBON
The built-in Oxocarbon variant of a Palette.
SOLARIZED_DARK
The built-in Solarized Dark variant of a Palette.
SOLARIZED_LIGHT
The built-in Solarized Light variant of a Palette.
TOKYO_NIGHT
The built-in Tokyo Night variant of a Palette.
TOKYO_NIGHT_LIGHT
The built-in Tokyo Night variant of a Palette.
TOKYO_NIGHT_STORM
The built-in Tokyo Night Storm variant of a Palette.

Functions§

darken
Darkens a Color by the given factor.
deviate
Deviates a Color by the given factor. Lightens if the Color is dark, darkens otherwise.
is_dark
Returns true if the Color is dark.
lighten
Lightens a Color by the given factor.
readable
Computes a Color from the given text color that is readable on top of the given background color.