import { RGBColor } from "./type.js"; //#region src/theme/helper.d.ts /** 实现十六进制颜色转RGB颜色,包括透明度 */ declare function HEXToRGB(color: string): RGBColor; /** * 混合两个颜色,并返回混合结果的十六进制表示。 * @param color1 - 第一个颜色,格式为`#RRGGBB`。 * @param color2 - 第二个颜色,格式为`#RRGGBB`。 * @param ratio - 颜色混合的比例,取值范围为0到1。 * @returns 混合结果的十六进制表示。 */ declare function mixColor(color1: `#${string}`, color2: `#${string}`, ratio: number): string; /** 将 `#RRGGBB` 转为指定不透明度百分比的 `rgba()`(等价于 color-mix N% + transparent) */ declare function hexWithAlpha(hex: `#${string}`, alphaPercent: number): string; /** 别名:`ratio` 为 0–1 时不透明度(0.08 → 8%) */ declare function mixColorWithAlpha(color: `#${string}`, ratio: number): string; /** 剥离 `#RRGGBBAA` 的 alpha 通道,返回 `#RRGGBB` */ declare function hexRgbOnly(hex: string): `#${string}`; /** 校验是否为 `#RRGGBB` 形式的 6 位 hex 颜色 */ declare function isHexColor(value: string): value is `#${string}`; declare function defineBySize(variable: Record<'small' | 'default' | 'large', number>): Record<'small' | 'default' | 'large', number>; /** * 引用全局主题 CSS 变量(`--u-*` 命名空间) * @param prop - 与 Theme 结构对应的连字符路径,如 `text-color-title`、`bg-color-hover` */ declare function cssVar(prop: string): string; //#endregion export { HEXToRGB, cssVar, defineBySize, hexRgbOnly, hexWithAlpha, isHexColor, mixColor, mixColorWithAlpha }; //# sourceMappingURL=helper.d.ts.map