mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-12-01 10:12:38 +08:00
fix: paste color is incorrect when enableColorCorrection=true
This commit is contained in:
@@ -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(';'))
|
||||
|
||||
Reference in New Issue
Block a user