mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 15:00:16 +08:00
fix(projects): 修复vertical sider自适应主题
This commit is contained in:
@@ -23,3 +23,12 @@ export function shallowColor(color: string, alpha: number = 0.5) {
|
||||
export function darkenColor(color: string) {
|
||||
return chroma(color).darken(0.5).hex();
|
||||
}
|
||||
|
||||
/**
|
||||
* 给颜色加透明度
|
||||
* @param color - 颜色
|
||||
* @param alpha - 透明度
|
||||
*/
|
||||
export function addColorAlpha(color: string, alpha: number) {
|
||||
return chroma(color).alpha(alpha).hex();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user