allc
Version:
A small typescript package for color conversion.
78 lines • 2.97 kB
TypeScript
/**
* Calculates an LMS' component from an LMS component.
* This function is relevant for the conversion between
* Oklab and CIE 1931 XYZ.
*
* @param component The LMS component.
*
* @returns The LMS' component.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSDashComponentFromLMSComponent: (component: number) => number;
/**
* Calculates the l component of LMS (Oklab) from CIE 1931 XYZ.
*
* @param x The X component of CIE 1931 XYZ.
* @param y The Y component of CIE 1931 XYZ.
* @param z The Z component of CIE 1931 XYZ.
*
* @returns The l component of LMS (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSLFromCIE1931XYZ: (x: number, y: number, z: number) => number;
/**
* Calculates the m component of LMS (Oklab) from CIE 1931 XYZ.
*
* @param x The X component of CIE 1931 XYZ.
* @param y The Y component of CIE 1931 XYZ.
* @param z The Z component of CIE 1931 XYZ.
*
* @returns The m component of LMS (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSMFromCIE1931XYZ: (x: number, y: number, z: number) => number;
/**
* Calculates the s component of LMS (Oklab) from CIE 1931 XYZ.
*
* @param x The X component of CIE 1931 XYZ.
* @param y The Y component of CIE 1931 XYZ.
* @param z The Z component of CIE 1931 XYZ.
*
* @returns The s component of LMS (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSSFromCIE1931XYZ: (x: number, y: number, z: number) => number;
/**
* Calculates the luminance component of Oklab from LMS' (Oklab).
*
* @param l The l component of LMS' (Oklab).
* @param m The m component of LMS' (Oklab).
* @param s The s component of LMS' (Oklab).
*
* @returns The luminance component of Oklab, typically in the range [0, 1].
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toOklabLFromLMSDash: (l: number, m: number, s: number) => number;
/**
* Calculates the a component of Oklab from LMS' (Oklab).
*
* @param l The l component of LMS' (Oklab).
* @param m The m component of LMS' (Oklab).
* @param s The s component of LMS' (Oklab).
*
* @returns The a component of Oklab.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toOklabAFromLMSDash: (l: number, m: number, s: number) => number;
/**
* Calculates the b component of Oklab from LMS' (Oklab).
*
* @param l The l component of LMS' (Oklab).
* @param m The m component of LMS' (Oklab).
* @param s The s component of LMS' (Oklab).
*
* @returns The b component of Oklab.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toOklabBFromLMSDash: (l: number, m: number, s: number) => number;
//# sourceMappingURL=to-oklab.d.ts.map