/** * The golden ratio. * @see {@link https://en.wikipedia.org/wiki/Golden_ratio} */ export declare const GOLDEN_RATIO = 1.618033988749; /** * Constrains a color component value to single-byte range (`0`-`255`). * @param c - A color component value. * @returns The input value constrained into single-byte range. */ export declare const safeRGBComponent: (c: number) => number; /** * Constructs a 32bit integer value that represents an RGBA color value. * @param r - The R component. * @param g - The G component. * @param b - The B component. * @param a - The A component. * @returns The constructed color value. */ export declare const fromRGBA: (r: number, g: number, b: number, a: number) => number; /** * Constructs a 32bit integer value that represents an RGBA color value. * The A component is fixed to `255` * @param r - The R component. * @param g - The G component. * @param b - The B component. * @returns The constructed color value. */ export declare const fromRGB: (r: number, g: number, b: number) => number; /** * Extracts the R component from a color value. * @param color - The color value. * @returns The R component of the color value. */ export declare const getR: (color: number) => number; /** * Extracts the G component from a color value. * @param color - The color value. * @returns The G component of the color value. */ export declare const getG: (color: number) => number; /** * Extracts the B component from a color value. * @param color - The color value. * @returns The B component of the color value. */ export declare const getB: (color: number) => number; /** * Extracts the A component from a color value. * @param color - The color value. * @returns The A component of the color value. */ export declare const getA: (color: number) => number; /** * Returns a new color that is a blend between a source and a destination * color linerally. The alpha component in these colors is ignored. Instead, the provided * `alpha` value is used to blend between the two colors. * @param src - The source color. * @param dst - The destination color. * @param alpha - The alpha value to use for blending. * @returns The blended color. */ export declare const blend: (src: number, dst: number, alpha: number) => number; /** * Returns a new color that is a blend between a source and a destination * color additively. The alpha component in these colors is ignored. Instead, the provided * `alpha` value is used to blend between the two colors. * @param src - The source color. * @param dst - The destination color. * @param alpha - The alpha value to use for blending. * @returns The blended color. */ export declare const blendAdditive: (src: number, dst: number, alpha: number) => number; /** * Returns a new color that is a blend between a source and a destination * color subtractively. The alpha component in these colors is ignored. Instead, the provided * `alpha` value is used to blend between the two colors. * @param src - The source color. * @param dst - The destination color. * @param alpha - The alpha value to use for blending. * @returns The blended color. */ export declare const blendSubtractive: (src: number, dst: number, alpha: number) => number; /** * Converts a color value to grayscale. * @param color - The color to convert. * @returns The grayscale value appropriate for the color. */ export declare const toGrayScale: (color: number) => number;