import { type UnSubscriber } from "../handlers/mod.js"; import type { Color as IColor, UIColors as IUIColors } from "../../gen/types/mod.js"; export declare class UIColors { inner: IUIColors; constructor(inner: IUIColors); static getAsync(): Promise; static onChange(cb: (payload: UIColors) => void): Promise; static default(): UIColors; setAsCssVariables(): void; } export interface Color extends IColor { } export declare class Color { constructor(obj: IColor); /** generates a random solid color */ static random(): Color; static fromHex(hex: string): Color; toHexString(): string; private getRuntimeStyleSheet; private insertIntoStyleSheet; /** * @param name the name of the color * the name will be parsed to lower kebab case and remove non-alphanumeric characters * this will create some css variables as:\ * `--color-{name}` -> #RRGGBBAA\ * `--color-{name}-rgb` -> R, G, B * `--color-{name}-rgba` -> R, G, B, A */ setAsCssVariable(name: string): void; /** * https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color * * @param accuracy if true will use an expensive but more accurate algorithm * @returns a number between 0 and 255 */ calcLuminance(accuracy?: boolean): number; complementary(): Color; } //# sourceMappingURL=ui_colors.d.ts.map