UNPKG

@radial-color-picker/angular-color-picker

Version:
75 lines (74 loc) 2.07 kB
export declare const hexToRgb: (hex: any) => { r: number; g: number; b: number; }; export declare const extractRGB: (rgb: any) => { r: number; g: number; b: number; }; export declare const extractHSL: (hsl: any) => { h: number; s: number; l: number; }; /** * Converts RGB color model to hexadecimal string. * * @memberOf Utilities * * @param r Integer between 0 and 255 * @param g Integer between 0 and 255 * @param b Integer between 0 and 255 * * @return 6 char long hex string */ export declare const rgbToHex: (r: number, g: number, b: number) => string; /** * Converts RGB color model to HSL model. * * @memberOf Utilities * * @param r Integer between 0 and 255 * @param g Integer between 0 and 255 * @param Integer between 0 and 255 * * @return The HSL representation containing the hue (in degrees), * saturation (in percentage) and luminosity (in percentage) fields. */ export declare const rgbToHsl: (r: number, g: number, b: number) => { hue: number; saturation: number; luminosity: number; }; /** * Converts HSL color model to hexademical string. * * @memberOf Utilities * * @param h Integer between 0 and 360 * @param s Integer between 0 and 100 * @param l Integer between 0 and 50 * * @return 6 char long hex string */ export declare const hslToHex: (h: number, s: number, l: number) => string; /** * Converts HSL color model to RGB model. * Shamelessly taken from http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c * * @memberOf Utilities * * @param h The hue. Number in the 0-360 range * @param s The saturation. Number in the 0-100 range * @param l The luminosity. Number in the 0-100 range * * @return The RGB representation containing the red, green and blue fields */ export declare const hslToRgb: (h: any, s: any, l: any) => { red: number; green: number; blue: number; }; export declare const _hue2rgb: (p: any, q: any, t: any) => any;