allc
Version:
A small typescript package for color conversion.
89 lines • 4 kB
TypeScript
/**
* Calculates the shared hue component of HSL and HSV (six primaries) from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The shared hue component of HSL and HSV, in radians.
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB
*/
export declare const toSharedHueFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the lightness component of HSL from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The lightness component of HSL, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB
*/
export declare const toHSLLFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the saturation component of HSL from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The saturation component of HSL, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB
*/
export declare const toHSLSFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the saturation component of HSV from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The saturation component of HSV, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB
*/
export declare const toHSVSFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the value component of HSV from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The value component of HSV, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB
*/
export declare const toHSVVFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the hue component of HSI (typically called _h2_) from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The hue component of HSI, in radians.
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
*/
export declare const toHSIHFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the saturation component of HSI from RGB.
*
* @param r The red component, typically in the range [0, 1].
* @param g The green component, typically in the range [0, 1].
* @param b The blue component, typically in the range [0, 1].
*
* @returns The saturation component of HSI, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
*/
export declare const toHSISFromRGB: (r: number, g: number, b: number) => number;
/**
* Calculates the intensity component of HSI from RGB.
*
* @param r The red component of RGB, typically in the range [0, 1].
* @param g The green component of RGB, typically in the range [0, 1].
* @param b The blue component of RGB, typically in the range [0, 1].
*
* @returns The intensity component of HSI, typically in the range [0, 1].
* @see https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
*/
export declare const toHSIIFromRGB: (r: number, g: number, b: number) => number;
//# sourceMappingURL=to-cylindrical.d.ts.map