UnityEditor.ColorPresetLibrary.DrawInternal C# (CSharp) Method

DrawInternal() private method

private DrawInternal ( Rect rect, Color preset ) : void
rect UnityEngine.Rect
preset Color
return void
        private void DrawInternal(Rect rect, Color preset)
        {
            this.Init();
            bool flag = preset.maxColorComponent > 1f;
            if (flag)
            {
                preset = preset.RGBMultiplied((float) (1f / preset.maxColorComponent));
            }
            Color color = GUI.color;
            if (((int) rect.height) == 14)
            {
                if (preset.a > 0.97f)
                {
                    this.RenderSolidSwatch(rect, preset);
                }
                else
                {
                    this.RenderSwatchWithAlpha(rect, preset, this.m_ColorSwatchTriangular);
                }
                if (flag)
                {
                    GUI.Label(rect, "h");
                }
            }
            else
            {
                this.RenderSwatchWithAlpha(rect, preset, this.m_MiniColorSwatchTriangular);
            }
            GUI.color = color;
        }