@types/culori
Version:
TypeScript definitions for culori
28 lines (23 loc) • 694 B
TypeScript
import { Color, FindColorByMode, Mode, NonEmptyArray } from "./common.js";
import { Rgb } from "./rgb/types.js";
type BlendTypes =
| "normal"
| "multiply"
| "screen"
| "hard-light"
| "overlay"
| "darken"
| "lighten"
| "color-dodge"
| "color-burn"
| "soft-light"
| "difference"
| "exclusion";
type BlendingFunction = (backdrop: number, source: number) => number;
declare function blend(colors: NonEmptyArray<Color | string>, type?: BlendTypes | BlendingFunction): Rgb;
declare function blend<M extends Mode>(
colors: Array<Color | string>,
type: BlendTypes | BlendingFunction,
mode: M,
): FindColorByMode<M>;
export default blend;