From 3b94653a3b1b0d4aee1746ee296b78974ec50e86 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Tue, 6 Aug 2019 18:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dserie=E7=B3=BB=E5=88=97?= =?UTF-8?q?=E6=95=B0=E8=B6=85=E8=BF=87=E8=B0=83=E8=89=B2=E7=9B=98=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=95=B0=E6=97=B6=E8=8E=B7=E5=8F=96=E7=9A=84=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/UI/Component/Theme.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/UI/Component/Theme.cs b/Scripts/UI/Component/Theme.cs index 8c8588f0..8189fd23 100644 --- a/Scripts/UI/Component/Theme.cs +++ b/Scripts/UI/Component/Theme.cs @@ -244,14 +244,14 @@ namespace XCharts public Color32 GetColor(int index) { if (index < 0) index = 0; - var customIndex = index >= m_CustomColorPalette.Count ? index : index % m_CustomColorPalette.Count; + var customIndex = index < m_CustomColorPalette.Count ? index : index % m_CustomColorPalette.Count; if (customIndex < m_CustomColorPalette.Count && m_CustomColorPalette[customIndex] != Color.clear) { return m_CustomColorPalette[customIndex]; } else { - var newIndex = index >= m_ColorPalette.Length ? index : index % m_ColorPalette.Length; + var newIndex = index < m_ColorPalette.Length ? index : index % m_ColorPalette.Length; if (newIndex < m_ColorPalette.Length) return m_ColorPalette[newIndex]; else return Color.clear;