@viarotel-org/unocss-preset-shades
Version:
🎨 为 Unocss 生成一组逐渐由浅至深的主题色调预设,通过提供基准颜色。
26 lines (24 loc) • 704 B
text/typescript
interface ShadesOptions {
shades?: number[];
baseShade?: number;
returnRgb?: boolean;
}
interface ColorOptions {
[key: number]: string;
DEFAULT: string;
}
/**
* 根据基础颜色生成不同深度的颜色
* @param {string} colorValue 基础色值
* @param {array} shades
* @param {number} baseShade
* @param {boolean} returnRgb
* @returns
*/
declare function generateShades(colorValue?: string, { shades, baseShade, returnRgb, }?: ShadesOptions): ColorOptions;
/**
* 更新主题色变量
* @param {*} baseColor 新的基础色值
*/
declare function updateShades(baseColor?: string): void;
export { type ColorOptions, type ShadesOptions, generateShades, updateShades };