ColorExtensionsDarken Method
Darkens a Color by increasing its RGB values by the specified percentage.
Namespace: DevCase.Extensions.ColorExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Color Darken(
this Color color,
float percent
)
<ExtensionAttribute>
Public Shared Function Darken (
color As Color,
percent As Single
) As Color
Dim color As Color
Dim percent As Single
Dim returnValue As Color
returnValue = color.Darken(percent)
public:
[ExtensionAttribute]
static Color Darken(
Color color,
float percent
)
[<ExtensionAttribute>]
static member Darken :
color : Color *
percent : float32 -> Color
No code example is currently available or this language may not be supported.
- color Color
-
The source Color.
- percent Single
-
The percentage by which to darken the source color.
If percent is 1.0F (100%),
the returned color will be Black.
Color
A
Color with its RGB values increased by the specified percentage.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Color. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
ArgumentOutOfRangeException
|
|