UNPKG

@thi.ng/color

Version:

Array-based color types, CSS parsing, conversions, transformations, declarative theme generation, gradients, presets

53 lines 1.43 kB
import type { MultiFn3O } from "@thi.ng/defmulti"; import type { Color, TypedColor } from "./api.js"; /** * Creates a tinted version of given `src` color and writes result into `out`. * The color is interpolated towards given `target` grayscale level (default: 1 * aka white). * * @remarks * Reference: https://www.handprint.com/HP/WCL/color3.html#stt * * If `out` is null, the resulting color will be written back into `src`. * * Only supported for the following color modes: * * - hcy * - hsi * - hsv * - lch * - oklch * * @param out * @param src * @param amount * @param target */ export declare const tint: MultiFn3O<Color | null, TypedColor<any>, number, number, Color>; /** * Version of {@link tint} with medium gray as target. * * @remarks * Reference: https://www.handprint.com/HP/WCL/color3.html#stt * * If `out` is null, the resulting color will be written back into `src`. * * @param out * @param src * @param n */ export declare const tone: (out: Color | null, src: TypedColor<any>, n: number) => Color; /** * Version of {@link tint} with black as target. * * @remarks * Reference: https://www.handprint.com/HP/WCL/color3.html#stt * * If `out` is null, the resulting color will be written back into `src`. * * @param out * @param src * @param n */ export declare const shade: (out: Color | null, src: TypedColor<any>, n: number) => Color; //# sourceMappingURL=tint.d.ts.map