UNPKG

@chayns/colors

Version:

JavaScript utility functions for the calculation of colors for chayns

9 lines (8 loc) 599 B
import type { RGB1, RGB255, RGBA1, RGBA255 } from '../types/rgb'; import type { HSV, HSVA } from '../types/hsv'; import type { HSL, HSLA } from '../types/hsl'; declare function mixRgb<T extends RGB255 | RGB1 | RGBA255 | RGBA1>(color1: T, color2: T, weightPercent?: number): T; declare function mixHex(color1: string, color2: string, weight: number): string | null; declare function mixHsv<T extends HSV | HSVA>(color1: T, color2: T, weight: number): T | null; declare function mixHsl<T extends HSL | HSLA>(color1: T, color2: T, weight: number): T | null; export { mixRgb, mixHex, mixHsl, mixHsv, };