From c7e4495e05616a738da624aa8a6ba6d05272c24a Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:39:22 +0800 Subject: [PATCH] refactor(themes): improve color patch resolver logic skip assign opacity if equals 1 --- src/lib/addons/themes/colors/patches/resolver.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/addons/themes/colors/patches/resolver.ts b/src/lib/addons/themes/colors/patches/resolver.ts index 17d541c..949c83d 100644 --- a/src/lib/addons/themes/colors/patches/resolver.ts +++ b/src/lib/addons/themes/colors/patches/resolver.ts @@ -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(); }