0.1.1 • Published 1 year ago

@andevjs/palette v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Color Palette

Install

npm i @andevjs/palette

How to use

import createPalette from "@andevjs/palette";

const primaryColor = createPalette("#9e8cfc");

Type

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.

Return

type Palette = {
  light: string;
  main: string;
  hover: string;
  alt: string;
  dark: string;
  shad: string;
  over: string;
};