fix: 减小高亮卡片透明度
高亮图案对比效果更明显
This commit is contained in:
@@ -3,7 +3,7 @@ import { IPersonConfig } from '@/types/storeType'
|
|||||||
|
|
||||||
export const useElementStyle = (element: any, person: IPersonConfig, index: number, patternList: number[], patternColor: string, cardColor: string, cardSize: { width: number, height: number }, textSize: number, mod: 'default' | 'lucky'|'sphere' = 'default') => {
|
export const useElementStyle = (element: any, person: IPersonConfig, index: number, patternList: number[], patternColor: string, cardColor: string, cardSize: { width: number, height: number }, textSize: number, mod: 'default' | 'lucky'|'sphere' = 'default') => {
|
||||||
if (patternList.includes(index+1)&&mod=='default') {
|
if (patternList.includes(index+1)&&mod=='default') {
|
||||||
element.style.backgroundColor = rgba(patternColor, Math.random() * 0.5 + 0.5)
|
element.style.backgroundColor = rgba(patternColor, Math.random() * 0.2 + 0.8)
|
||||||
}
|
}
|
||||||
else if(mod=='sphere'||mod=='default') {
|
else if(mod=='sphere'||mod=='default') {
|
||||||
element.style.backgroundColor = rgba(cardColor, Math.random() * 0.5 + 0.25)
|
element.style.backgroundColor = rgba(cardColor, Math.random() * 0.5 + 0.25)
|
||||||
|
|||||||
Reference in New Issue
Block a user