ComponentFactory.Krypton.Toolkit.PaletteSparkleBase.GetElementColor2 C# (CSharp) Method

GetElementColor2() public method

Gets the second element color.
public GetElementColor2 ( PaletteElement element, PaletteState state ) : Color
element PaletteElement Element for which color is required.
state PaletteState Palette value should be applicable to this state.
return Color
        public override Color GetElementColor2(PaletteElement element, PaletteState state)
        {
            if (CommonHelper.IsOverrideState(state))
                return Color.Empty;

            switch (element)
            {
                case PaletteElement.TrackBarTick:
                    return _trackBarColors[0];
                case PaletteElement.TrackBarTrack:
                    return _trackBarColors[2];
                case PaletteElement.TrackBarPosition:
                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return ControlPaint.Light(_colorDark00);
                        case PaletteState.Normal:
                        case PaletteState.Tracking:
                        case PaletteState.Pressed:
                            return _colorDark00;
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                default:
                    // Should never happen!
                    Debug.Assert(false);
                    break;
            }

            return Color.Red;
        }
PaletteSparkleBase