69 references to PopupButtonColorMath
System.Windows.Forms (69)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (1)
136Color textBackColor = PopupButtonColorMath.Composite(backColor, parentBackColor);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonColorMath.cs (7)
15internal const float MinimumTextContrastRatio = PopupButtonColorMath.MinimumReadableContrastRatio; 30=> PopupButtonColorMath.Blend(baseColor, Application.SystemVisualSettings.AccentColor, AccentBlendAmount); 38PushButtonState.Hot => PopupButtonColorMath.Lighten(accentColor, DefaultHoverLightenAmount), 39PushButtonState.Pressed => PopupButtonColorMath.Darken(accentColor, DefaultPressedDarkenAmount), 45float blackContrast = PopupButtonColorMath.GetContrastRatio(Color.Black, backColor); 46float whiteContrast = PopupButtonColorMath.GetContrastRatio(Color.White, backColor); 47Color foreColor = PopupButtonColorMath.GetReadableForeColor(backColor);
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (7)
212? PopupButtonColorMath.Blend( 217? PopupButtonColorMath.Blend( 221: PopupButtonColorMath.TowardsContrast( 226buttonColor = PopupButtonColorMath.Mute( 237? PopupButtonColorMath.GetReadableForeColor(buttonColor) 317: PopupButtonColorMath.GetReadableForeColor( 492: PopupButtonColorMath.Mute(background, 0.55f);
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (9)
217Color surfaceColor = PopupButtonColorMath.TowardsContrast( 222surfaceColor = PopupButtonColorMath.Mute(surfaceColor, 0.55f); 293borderColor = PopupButtonColorMath.Mute(borderColor, 0.55f); 336Color borderColor = PopupButtonColorMath.TowardsContrast( 341bodyColor = PopupButtonColorMath.Mute(bodyColor, 0.55f); 342headerColor = PopupButtonColorMath.Mute(headerColor, 0.55f); 343borderColor = PopupButtonColorMath.Mute(borderColor, 0.55f); 383? PopupButtonColorMath.GetReadableForeColor(headerColor) 385PopupButtonColorMath.GetReadableForeColor(headerColor),
System\Windows\Forms\Rendering\Animation\AnimatedControlRenderer.cs (2)
183Color interactionColor = PopupButtonColorMath.TowardsContrast(color, InteractionShadeAmount); 184return PopupButtonColorMath.Blend(color, interactionColor, progress);
System\Windows\Forms\Rendering\Animation\AnimatedFocusIndicatorRenderer.cs (1)
40=> PopupButtonColorMath.Blend(borderColor, focusColor, FocusAmount);
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (5)
139faceColor = PopupButtonColorMath.Blend(baseColor, hoverColor, _hoverCurrent); 140faceColor = PopupButtonColorMath.Blend(faceColor, pressedColor, _pressCurrent); 148? PopupButtonColorMath.TowardsContrast(faceColor, 0.35f) 248? PopupButtonColorMath.TowardsContrast(baseColor, CustomHoverShadeAmount) 253? PopupButtonColorMath.TowardsContrast(baseColor, CustomPressedShadeAmount)
System\Windows\Forms\Rendering\Button\PopupButtonKeyCapRenderer.cs (26)
385Color upperShadow = PopupButtonColorMath.Blend(palette.TextShadow, palette.BowlCenter, 0.55f); 499? PopupButtonColorMath.Lighten(context.BackColor, 0.1f) 500: PopupButtonColorMath.Darken(context.BackColor, 0.1f); 854Color back = enabled ? surfaceBackColor : PopupButtonColorMath.Mute(surfaceBackColor, 0.55f); 856float luminance = PopupButtonColorMath.GetLuminance(back); 860: PopupButtonColorMath.Blend(context.BorderColor, back, 0.45f); 863border = PopupButtonColorMath.EnsureContrast(border, back, 0.08f); 866Color bodyLight = PopupButtonColorMath.Lighten(back, metrics.HighlightAmount * 0.9f * contrast); 867Color bodyDark = PopupButtonColorMath.Darken(back, metrics.ShadowAmount * 0.9f * contrast); 868Color bowlCenter = PopupButtonColorMath.Darken(back, (metrics.ShadowAmount * 0.75f * contrast) + (enabled ? 0f : 0.02f)); 869Color bowlEdge = PopupButtonColorMath.Lighten(back, metrics.HighlightAmount * 0.55f * contrast); 884? PopupButtonColorMath.GetReadableForeColor(darkestBowl, lightestBowl) 891PopupButtonColorMath.GetContrastRatio(text, darkestBowl), 892PopupButtonColorMath.GetContrastRatio(text, lightestBowl)); 895&& textContrast < PopupButtonColorMath.MinimumReadableContrastRatio 907LipLight = PopupButtonColorMath.Lighten(back, metrics.HighlightAmount * 1.3f * contrast), 908LipDark = PopupButtonColorMath.Darken(back, metrics.ShadowAmount * 1.2f * contrast), 912TextHighlight = PopupButtonColorMath.GetTextHighlight(bowlCenter, reliefStrength), 913TextShadow = PopupButtonColorMath.GetTextShadow(bowlCenter, reliefStrength), 914Focus = PopupButtonColorMath.EnsureContrast( 915PopupButtonColorMath.TowardsContrast(back, 0.55f), 927Color renderedBody = PopupButtonColorMath.Composite(bodyColor, context.SurfaceColor); 928Color renderedBowl = PopupButtonColorMath.Composite(bowlColor, renderedBody); 931PopupButtonColorMath.Composite( 935PopupButtonColorMath.Composite( 942float luminance = PopupButtonColorMath.GetRelativeLuminance(color);
System\Windows\Forms\Rendering\CheckBox\AnimatedToggleSwitchRenderer.cs (3)
205? PopupButtonColorMath.Blend(offColor, onColor, _onAmountCurrent) 207Color highContrastForeground = PopupButtonColorMath.Blend( 221: PopupButtonColorMath.GetReadableForeColor(offColor, onColor)
System\Windows\Forms\Rendering\ModernControlColorMath.cs (7)
40Color muteColor = PopupButtonColorMath.Blend( 44Color mutedForeColor = PopupButtonColorMath.Blend( 57Color contrastColor = PopupButtonColorMath.GetReadableForeColor( 67Color candidate = PopupButtonColorMath.Blend( 93=> PopupButtonColorMath.GetContrastRatio( 96&& PopupButtonColorMath.GetContrastRatio( 103: PopupButtonColorMath.Composite(color, SystemColors.Control);
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (1)
161: PopupButtonColorMath.GetReadableForeColor(onColor, backColor);