ComponentFactory.Krypton.Toolkit.PaletteOffice2007Base.GetElementColor4 C# (CSharp) Method

GetElementColor4() public method

Gets the fourth element color.
public GetElementColor4 ( 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 GetElementColor4(PaletteElement element, PaletteState state)
        {
            switch (element)
            {
                case PaletteElement.TrackBarTick:
                    if (CommonHelper.IsOverrideState(state))
                        return Color.Empty;

                    return _trackBarColors[0];
                case PaletteElement.TrackBarTrack:
                    if (CommonHelper.IsOverrideState(state))
                        return Color.Empty;

                    return _trackBarColors[3];
                case PaletteElement.TrackBarPosition:
                    if (CommonHelper.IsOverrideStateExclude(state, PaletteState.FocusOverride))
                        return Color.Empty;

                    switch (state)
                    {
                        case PaletteState.Disabled:
                            return ControlPaint.LightLight(_ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1]);
                        case PaletteState.Normal:
                            return _ribbonColors[(int)SchemeOfficeColors.ButtonNormalBack1];
                        case PaletteState.Tracking:
                        case PaletteState.FocusOverride:
                            return _buttonBackColors[2];
                        case PaletteState.Pressed:
                            return _buttonBackColors[4];
                        default:
                            throw new ArgumentOutOfRangeException("state");
                    }
                default:
                    // Should never happen!
                    Debug.Assert(false);
                    break;
            }

            return Color.Red;
        }
PaletteOffice2007Base