ControlPaint.Dark Method (Color, Single)

 

Creates a new dark color object for the control from the specified color and darkens it by the specified percentage.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static Color Dark(
	Color baseColor,
	float percOfDarkDark
)

Parameters

baseColor
Type: System.Drawing.Color

The Color to be darkened.

percOfDarkDark
Type: System.Single

The percentage to darken the specified Color.

Return Value

Type: System.Drawing.Color

A Color that represent the dark color on the control.

If the specified Color is one of the SystemColors, the color is converted to a SystemColors.ControlDark color; otherwise, the color's luminosity value is decreased.

.NET Framework
Available since 1.1
Return to top
Show: