Create variant color palettes from a single color and generate code for them.
npm i @andevjs/palette
import createPalette from "@andevjs/palette";
const primaryColor = createPalette("#9e8cfc");
types
are also available to import
import { CreatePalette, Palette } from "@andevjs/palette";
type CreatePalette = (color: string, altColor?: string) => Palette;
color
- Main Color
altColor
- Alternative to the main color, for example, if the main color is too light or too dark, alternate a color with a darker tone to the light color, or a lighter tone to the dark color.
type Palette = {
light: string;
main: string;
hover: string;
alt: string;
dark: string;
shad: string;
over: string;
};
Developed by @andremalveira © 2022 | License MIT