fix: 减小高亮卡片透明度

高亮图案对比效果更明显
This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-19 22:08:46 +08:00
parent 9a44f2819e
commit 02b08694a7

View File

@@ -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') => {
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') {
element.style.backgroundColor = rgba(cardColor, Math.random() * 0.5 + 0.25)