@thi.ng/color
Version:
Array-based color types, CSS parsing, conversions, transformations, declarative theme generation, gradients, presets
92 lines • 3.52 kB
TypeScript
import type { MaybeColor } from "./api.js";
import { type LCH } from "./lch/lch.js";
/**
* Returns array of `src` color (converted to LCH) and its complementary color,
* possibly adjusted via optional `deltaL` and `deltaC` args (offsets for L & C
* channels).
*
* @param src -
* @param deltaL -
* @param deltaC -
*/
export declare const complementaryStrategy: (src: MaybeColor, deltaL?: number, deltaC?: number) => LCH[];
/**
* Returns array of `src` color and 2 neighboring colors, each ±rotated by
* normalized `theta` and possibly adjusted via optional `deltaL` and `deltaC`
* args (offsets for L & C channels).
*
* @param src -
* @param theta -
* @param deltaL -
* @param deltaC -
*/
export declare const analogStrategy: (src: MaybeColor, theta?: number, deltaL?: number, deltaC?: number) => LCH[];
/**
* Similar to {@link splitComplementaryStrategy}. Returns array of `src` color,
* its complementary color and 2 of that colors' neighbors, each ±rotated by
* normalized `theta` and possibly adjusted via optional `deltaL` and `deltaC`
* args (offsets for L & C channels).
*
* @param src -
* @param theta -
* @param deltaL -
* @param deltaC -
*/
export declare const splitAnalogStrategy: (src: MaybeColor, theta?: number, deltaL?: number, deltaC?: number) => LCH[];
/**
* Similar to {@link splitAnalogStrategy}. Returns array of `src` color and 2
* neighbors of its complementary color, each ±rotated by normalized `theta`
* (from the complementary hue) and possibly adjusted via optional `deltaL` and
* `deltaC` args (offsets for L & C channels).
*
* @param src -
* @param theta -
* @param deltaL -
* @param deltaC -
*/
export declare const splitComplementaryStrategy: (src: MaybeColor, theta?: number, deltaL?: number, deltaC?: number) => LCH[];
/**
* Returns array of 5 colors all sharing same hue and chromacity of given `src`
* color, but with these luminance settings: 0.0, 0.25, 0.5, 0.75, 1.0. Chroma
* can be adjusted via optional `deltaC` offset.
*
* @param src -
* @param deltaC -
*/
export declare const monochromeStrategy: (src: MaybeColor, deltaC?: number) => LCH[];
/**
* Version of {@link splitComplementaryStrategy} with an hardcoded `theta` of
* 1/6 to produce 3 colors with hues uniformly distributed on the color wheel
* (possibly adjusted via optional `deltaL` and `deltaC` args, aka offsets for L
* & C channels).
*
* @param src -
* @param deltaL -
* @param deltaC -
*/
export declare const triadicStrategy: (src: MaybeColor, deltaL?: number, deltaC?: number) => LCH[];
/**
* Returns array of `src` color and 3 other colors whose hues form a rectangle,
* using `theta` to define the angular separation. The hues are at: `src`,
* `src+theta`, `src+1/2` (complementary) and `src+1/2+theta`. Colors are
* possibly adjusted via optional `deltaL` and `deltaC` args (offsets for L & C
* channels).
*
* @param src -
* @param theta -
* @param deltaL -
* @param deltaC -
*/
export declare const tetradicStrategy: (src: MaybeColor, theta?: number, deltaL?: number, deltaC?: number) => LCH[];
/**
* Version of {@link tetradicStrategy} with an hardcoded `theta` of 1/4 to
* produce 4 colors with hues uniformly distributed on the color wheel (possibly
* adjusted via optional `deltaL` and `deltaC` args, aka offsets for L & C
* channels).
*
* @param src -
* @param deltaL -
* @param deltaC -
*/
export declare const squareStrategy: (src: MaybeColor, deltaL?: number, deltaC?: number) => LCH[];
//# sourceMappingURL=strategies.d.ts.map