import { IRgb } from '@tidy-ui/types'; /** * Hue */ interface IHue { /** * maximum value of hue */ max?: number; /** * minimum value of hue */ min?: number; } /** * ColorHash options */ interface ColorHashOptions { /** * Hue */ hue?: number | IHue | IHue[]; /** * Lightness */ lightness?: number | number[]; /** * Saturation */ saturation?: number | number[]; } /** * Utility to generate color based on a string computing its hash */ declare class ColorHash { private L; private S; private hueRanges; /** * Constructor params * * @param {ColorHashOptions} options color hash options */ constructor(options: ColorHashOptions); /** * Returns the hash in [h, s, l]. * Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1]; * * @param {string} str string to hash * @returns {Array} [h, s, l] */ hsl(str: string): [number, number, number]; /** * Returns the hash in [r, g, b]. * Note that R, G, B ∈ [0, 255] * * @param {string} str string to hash * @returns {Array} [r, g, b] */ rgb(str: string): IRgb; } export default ColorHash;