Table of Contents

Method FromName

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

FromName(string)

Creates a Color structure from the specified name of a predefined color.

public static Color FromName(string name)

Parameters

name string

A string that is the name of a predefined color. Valid names are the same as the names of the elements of the KnownColor enumeration.

Returns

Color

The Color that this method creates.

Remarks

A predefined color is also called a known color and is represented by an element of the KnownColor enumeration. If the name parameter is not the valid name of a predefined color, the FromName(string) method creates a Color structure that has an ARGB value of 0 (that is, all ARGB components are 0).