System.Windows.Forms.ControlPaint.Dark Method

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

Syntax

public static System.Drawing.Color Dark (System.Drawing.Color baseColor, float percOfDarkDark)

Parameters

baseColor
The System.Drawing.Color to be darkened.
percOfDarkDark
The percentage to darken the specified System.Drawing.Color.

Returns

A System.Drawing.Color that represent the dark color on the control.

Remarks

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

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0