优化代码,更好的支持自定义图表

This commit is contained in:
monitor1394
2021-04-28 06:56:28 +08:00
parent 6a76f25b7d
commit 6ded23a72e
5 changed files with 6 additions and 8 deletions

View File

@@ -1005,10 +1005,9 @@ namespace XCharts
}
}
public static Color32 GetHighlightColor(Color32 color)
public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)
{
var newColor = color;
var rate = 0.8f;
newColor.r = (byte)(color.r * rate);
newColor.g = (byte)(color.g * rate);
newColor.b = (byte)(color.b * rate);