23 references to GetBrightness
System.Windows.Forms (9)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1298
if (highlight.
GetBrightness
() < .5)
System\Windows\Forms\Rendering\ControlPaint.cs (8)
383
internal static bool IsDark(Color color) => color.
GetBrightness
() <= .5;
1516
float intensity = backColor.
GetBrightness
();
1790
if (backColor.
GetBrightness
() < .5)
2075
=> color.
GetBrightness
() < .5 ? darkROP : lightROP;
2082
Color brushColor = backColor.
GetBrightness
() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
2133
|| (!highContrast && t_focusPenColor.
GetBrightness
() <= .5 && baseColor.
GetBrightness
() <= .5)
2212
Color brushColor = backColor.
GetBrightness
() <= .5 ? SystemColors.ControlLight : SystemColors.ControlDark;
System.Windows.Forms.Design (14)
System\Drawing\Design\ColorEditor.StandardColorComparer.cs (4)
48
if (left.
GetBrightness
() < right.
GetBrightness
())
53
if (left.
GetBrightness
() > right.
GetBrightness
())
System\Windows\Forms\Design\DesignerUtils.cs (3)
191
if (backColor != Color.Empty && backColor.
GetBrightness
() < .5)
215
if (backColor != Color.Empty && backColor.
GetBrightness
() < .5)
229
if (backColor != Color.Empty && backColor.
GetBrightness
() < .5)
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
441
if (backColor != Color.Empty && backColor.
GetBrightness
() < .5)
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
426
if (backColor.
GetBrightness
() < .5)
System\Windows\Forms\Design\PanelDesigner.cs (1)
72
Color penColor = Control.BackColor.
GetBrightness
() < .5 ?
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
38
if (ctl.BackColor.
GetBrightness
() < .5)
System\Windows\Forms\Design\SplitterDesigner.cs (1)
31
Color penColor = control.BackColor.
GetBrightness
() < .5 ? Color.White : Color.Black;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
149
Color penColor = control.BackColor.
GetBrightness
() < .5 ? ControlPaint.Light(control.BackColor) : ControlPaint.Dark(control.BackColor);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
46
Color penColor = Control.BackColor.
GetBrightness
() < .5 ?