UNPKG

1.28 kBTypeScriptView Raw
1import { GradientObject } from '../graphic/Gradient';
2export declare function parse(colorStr: string, rgbaArr?: number[]): number[];
3export declare function lift(color: string, level: number): string;
4export declare function toHex(color: string): string;
5export declare function fastLerp(normalizedValue: number, colors: number[][], out?: number[]): number[];
6export declare const fastMapToColor: typeof fastLerp;
7declare type LerpFullOutput = {
8 color: string;
9 leftIndex: number;
10 rightIndex: number;
11 value: number;
12};
13export declare function lerp(normalizedValue: number, colors: string[], fullOutput: boolean): LerpFullOutput;
14export declare function lerp(normalizedValue: number, colors: string[]): string;
15export declare const mapToColor: typeof lerp;
16export declare function modifyHSL(color: string, h?: number, s?: number, l?: number): string;
17export declare function modifyAlpha(color: string, alpha?: number): string;
18export declare function stringify(arrColor: number[], type: string): string;
19export declare function lum(color: string, backgroundLum: number): number;
20export declare function random(): string;
21export declare function liftColor(color: GradientObject): GradientObject;
22export declare function liftColor(color: string): string;
23export {};