allc
Version:
A small typescript package for color conversion.
78 lines • 2.85 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 toLMSComponentFromLMSDashComponent: (component: number) => number;
/**
* Calculates the l' component of LMS' (Oklab) from Oklab.
*
* @param l The luminance component of Oklab.
* @param a The a component of Oklab.
* @param b The b component of Oklab.
*
* @returns The l' component of LMS' (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSDashLFromOklab: (l: number, a: number, b: number) => number;
/**
* Calculates the m' component of LMS' (Oklab) from Oklab.
*
* @param l The luminance component of Oklab.
* @param a The a component of Oklab.
* @param b The b component of Oklab.
*
* @returns The m' component of LMS' (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSDashMFromOklab: (l: number, a: number, b: number) => number;
/**
* Calculates the s' component of LMS' (Oklab) from Oklab.
*
* @param l The luminance component of Oklab.
* @param a The a component of Oklab.
* @param b The b component of Oklab.
*
* @returns The s' component of LMS' (Oklab).
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toLMSDashSFromOklab: (l: number, a: number, b: number) => number;
/**
* Calculates the X component of CIE 1931 XYZ from LMS'.
*
* @param l The l' component of LMS'.
* @param m The m' component of LMS'.
* @param s The s' component of LMS'.
*
* @returns The X component of CIE 1931 XYZ.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toCIE1931XYZXFromLMS: (l: number, m: number, s: number) => number;
/**
* Calculates the Y component of CIE 1931 XYZ from LMS'.
*
* @param l The l' component of LMS'.
* @param m The m' component of LMS'.
* @param s The s' component of LMS'.
*
* @returns The Y component of CIE 1931 XYZ.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toCIE1931XYZYFromLMS: (l: number, m: number, s: number) => number;
/**
* Calculates the Z component of CIE 1931 XYZ from LMS'.
*
* @param l The l' component of LMS'.
* @param m The m' component of LMS'.
* @param s The s' component of LMS'.
*
* @returns The Z component of CIE 1931 XYZ.
* @see https://bottosson.github.io/posts/oklab/#converting-from-xyz-to-oklab
*/
export declare const toCIE1931XYZZFromLMS: (l: number, m: number, s: number) => number;
//# sourceMappingURL=oklab-to-cie-1931-xyz.d.ts.map