UNPKG

@14ch/color-palette-generator

Version:

A comprehensive color palette generation library with support for color scales, combinations, and transparency

51 lines (50 loc) 1.66 kB
import type { LightnessMethod, HuePaletteConfig, Palette } from "./types"; /** * Adjust color hue while maintaining the same tone (saturation/lightness) */ export declare const adjustColorToSameTone: ({ color, targetHue, lightnessMethod, }: { color: string; targetHue: number; lightnessMethod?: LightnessMethod; }) => string; /** * Named hue positions on the color wheel (24 divisions) */ export declare const HUE_NAMES: { readonly 0: "red"; readonly 15: "scarlet"; readonly 30: "orange"; readonly 45: "amber"; readonly 60: "yellow"; readonly 75: "peridot"; readonly 90: "lime"; readonly 105: "sage"; readonly 120: "green"; readonly 135: "jade"; readonly 150: "emerald"; readonly 165: "turquoise"; readonly 180: "cyan"; readonly 195: "cerulean"; readonly 210: "azure"; readonly 225: "cobalt"; readonly 240: "blue"; readonly 255: "violet"; readonly 270: "purple"; readonly 285: "orchid"; readonly 300: "magenta"; readonly 315: "rose"; readonly 330: "crimson"; readonly 345: "ruby"; }; /** * Generate complete color palettes for each hue division */ export declare const generateHuePalette: ({ color, divisions, lightnessMethod, hueShiftMode, includeTransparent, bgColorLight, bgColorDark, transparentOriginLevel, includeTextColors, }: HuePaletteConfig) => Palette; /** * Generate evenly spaced base colors for each hue division */ export declare const generateHueColors: ({ color, divisions, lightnessMethod, }: Pick<HuePaletteConfig, "color" | "divisions" | "lightnessMethod">) => Array<{ name: string; hue: number; color: string; }>;