Skip to content

Commit

Permalink
refactor(themes): improve color patch resolver logic
Browse files Browse the repository at this point in the history
skip assign opacity if equals 1
  • Loading branch information
pylixonly committed Nov 12, 2024
1 parent e141a62 commit c7e4495
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/addons/themes/colors/patches/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit c7e4495

Please sign in to comment.