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