fix: paste color is incorrect when enableColorCorrection=true

This commit is contained in:
mob-sakai
2026-11-25 21:17:14 +09:00
parent 8d906a7836
commit 7be2bf463d
+6 -1
View File
@@ -20,7 +20,7 @@ namespace Coffee.UIEffects.Editors
return; return;
} }
color.colorValue = value; color.colorValue = ApplyPasteColorCorrection(value);
} }
internal static bool TryParseColor(string text, out Color color) internal static bool TryParseColor(string text, out Color color)
@@ -86,6 +86,11 @@ namespace Coffee.UIEffects.Editors
return true; return true;
} }
private static Color ApplyPasteColorCorrection(Color color)
{
return UIEffectProjectSettings.enableColorCorrection ? color.linear : color;
}
private static bool TryExtractCssColorValue(string text, out string value) private static bool TryExtractCssColorValue(string text, out string value)
{ {
foreach (var declaration in text.Split(';')) foreach (var declaration in text.Split(';'))