refactor(themes): improve color patch resolver logic

skip assign opacity if equals 1
This commit is contained in:
pylixonly 2024-11-12 23:39:22 +08:00
parent e141a62dd0
commit c7e4495e05

View file

@ -54,6 +54,7 @@ export default function patchDefinitionAndResolver() {
}
if (semanticDef?.value) {
if (semanticDef.opacity === 1) return semanticDef.value;
return chroma(semanticDef.value).alpha(semanticDef.opacity).hex();
}