import { type } from "@kcutils/helper"; import { RGB } from "../../typings/RGB"; import { HSL } from "../../typings/HSL"; import { HSV } from "../../typings/HSV"; import { Type } from "../../typings/NumberType"; import { HEX } from "../../typings/HEX"; import { Named } from "../../typings/Named"; export declare const defaultRGB: RGB; export declare const enforceRGB: (rgb?: type.Optional>) => RGB; export declare const roundedRGB: (rgb: RGB, digit?: number | undefined) => RGB; /** * Handle bounds / percentage checking to conform to CSS color spec * * * @param rgb any type of rgb object or incompleted rgb object * @return number type of rgb object */ export declare const rgbToRgb: (rgb: type.Optional>, type?: Type) => RGB; /** * Converts an RGB color value to HSL. * * @param rgb any type of rgb object * @return decimal type of hsl object */ export declare const rgbToHsl: (rgb: RGB) => HSL; /** * Converts an RGB color value to HSV. * * @param rgb any type of rgb object * @return decimal type of hsv object */ export declare const rgbToHsv: (rgb: RGB) => HSV; export declare type RGBHexOptions = { minify?: boolean; alpha?: boolean; }; /** * Converts an RGBA color plus alpha transparency to hex * Assumes r, g, b are contained in the set [0, 255] and * a in [0, 1]. Returns a 4 or 8 character rgba hex * * @param rgb any type of rgb object * @param opts options */ export declare const rgbToHex: (rgb: RGB, opts?: RGBHexOptions | undefined) => HEX; /** * Converts an RGB color to Named if exist, or undefined * * @param rgb any type of rgb object */ export declare const rgbToNamed: (rgb: RGB) => Named | undefined; //# sourceMappingURL=rgb.d.ts.map