mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 23:10:18 +08:00
feat(projects): 添加缓存主题色
This commit is contained in:
@@ -136,3 +136,11 @@ export function addColorAlpha(color: string, alpha: number) {
|
||||
export function mixColor(firstColor: string, secondColor: string, ratio: number) {
|
||||
return colord(firstColor).mix(secondColor, ratio).toHex();
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是白颜色
|
||||
* @param color - 颜色
|
||||
*/
|
||||
export function isWhiteColor(color: string) {
|
||||
return colord(color).isEqual('#ffffff');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user