From 7be2bf463dc91feb41d4585841ddc489f0302433 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Wed, 25 Nov 2026 21:17:14 +0900 Subject: [PATCH] fix: paste color is incorrect when `enableColorCorrection=true` --- Packages/src/Editor/PasteColorUtil.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Packages/src/Editor/PasteColorUtil.cs b/Packages/src/Editor/PasteColorUtil.cs index 64f3fa2..f752623 100644 --- a/Packages/src/Editor/PasteColorUtil.cs +++ b/Packages/src/Editor/PasteColorUtil.cs @@ -20,7 +20,7 @@ namespace Coffee.UIEffects.Editors return; } - color.colorValue = value; + color.colorValue = ApplyPasteColorCorrection(value); } internal static bool TryParseColor(string text, out Color color) @@ -86,6 +86,11 @@ namespace Coffee.UIEffects.Editors return true; } + private static Color ApplyPasteColorCorrection(Color color) + { + return UIEffectProjectSettings.enableColorCorrection ? color.linear : color; + } + private static bool TryExtractCssColorValue(string text, out string value) { foreach (var declaration in text.Split(';'))