export declare class Color { decode(color: string): any; hex2hsv(hex: string): any[]; hex2hsb(hex: string): any[]; rgb2hex(r: number, g: number, b: number): string; hex2hsl(hex: string): number[]; hex2yuv(hex: string): number[]; yuv2rgb(y: number, u: number, v: number, a?: number): any[]; hsv2rgb(h?: number, s?: number, v?: number, a?: number): number[]; hsb2rgb(h: number, s: number, b: number, a: number): number[]; rgb2hsv(r?: number, g?: number, b?: number): number[]; rgb2hsb(r: number, g: number, b: number): number[]; hsv2hex(h: number, s: number, v: number): string; hsb2hex(h: number, s: number, b: number): string; rgb2hsl(r?: number, g?: number, b?: number): number[]; hsl2rgb(h?: number, s?: number, l?: number, a?: number): number[]; hsl2hex(h: number, s: number, l: number): string; randomRgb(min?: number, max?: number): number[]; randomHsb(): number[]; complement(color: string): string; reversed(color: string): string; hex2RgbString(hex: string, a?: number): string; hsv2RgbString(h: number, s: number, v: number, a?: number): string; hsb2RgbString(...args: any[]): string; hsl2RgbString(h: number, s: number, l: number, a?: number): string; yuv2RgbString(y: number, u: number, v: number, a?: number): string; encodeColorData(rgbhsv: number[]): string; decodeColorData(data?: string): number[]; decodeColorDataWithPosition(data?: string): number[]; encodeColorDataWithPosition(rgbxyve: number[]): string; encodeSceneData(data: any): string | number[]; decodeSceneData(data: any): number[]; decodeSceneDataWithMode(data: any): number[]; toRgbString(rgb: number[], a?: number): string; /** * * Neil Bartlett * neilbartlett.com * 2015-01-22 * * Copyright [2015] [Neil Bartlett] * * * Color Temperature is the color due to black body radiation at a given * temperature. The temperature is given in Kelvin. The concept is widely used * in photography and in tools such as f.lux. * * The function here converts a given color temperature into a near equivalent * in the RGB colorspace. The function is based on a curve fit on standard sparse * set of Kelvin to RGB mappings. * * Two conversions are presented here. The one colorTempertature2RGBUSingTH * is a JS version of the algorithm developed by Tanner Helland. The second is a * slightly more accurate conversion based on a refitting of the original data * using different curve fit functions. The performance cost of the two * approaches is very similar and in general the second algorithm is preferred. * * NOTE The approximations used are suitable for photo-mainpulation and other * non-critical uses. They are not suitable for medical or other high accuracy * use cases. * * Accuracy is best between 1000K and 40000K. * * See http://github.com/neilbartlett/color-temperature for further details. * * */ /** * A JS verion of Tanner Helland's original algorithm. * Input: color temperature in degrees Kelvin * Output: json object of red, green and blue components of the Kelvin temperature */ kelvin2rgbUsingTH(kelvin: number): number[]; /** * A more accurate version algorithm based on a different curve fit to the * original RGB to Kelvin data. * Input: color temperature in degrees Kelvin * Output: json object of red, green and blue components of the Kelvin temperature */ kelvin2rgb(kelvin: number): number[]; /** convert an rgb in JSON format into to a Kelvin color temperature */ rgb2kelvin([r, , b]: [any, any, any]): number; }