ColorHelper ColorHelper ColorHelper ColorHelper ColorHelper Class

Definition

Provides static helper methods for processing Color values. C# and Microsoft Visual Basic code should use methods of Color instead.

public : sealed class ColorHelper : IColorHelper
struct winrt::Windows::UI::ColorHelper : IColorHelper
public sealed class ColorHelper : IColorHelper
Public NotInheritable Class ColorHelper Implements IColorHelper
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Color is a Windows Runtime structure that represents a color that has four channels: A (alpha), R (red), G (green), B (blue). Each of the values is stored as a Byte type with value 0-255. The most frequent application of Color is to define color-related properties in a UI element as part of a UWP app using C++, C#, or Visual Basic and its XAML UI definition.

ColorHelper is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use methods of Color instead, because utility methods are available directly on the structure due to .NET Framework runtime support. C++ code including Visual C++ component extensions (C++/CX) can only access the data values on Color, for example the A field value. For C++ developers, some of the utility features that C# and Microsoft Visual Basic can use directly on Color as nondata members are available from the ColorHelper class.

Methods

FromArgb(Byte, Byte, Byte, Byte) FromArgb(Byte, Byte, Byte, Byte) FromArgb(Byte, Byte, Byte, Byte) FromArgb(Byte, Byte, Byte, Byte) FromArgb(Byte, Byte, Byte, Byte)

Generates a Color structure, based on discrete Byte values for ARGB components. C# and Microsoft Visual Basic code should use Color.FromArgb instead.

ToDisplayName(Color) ToDisplayName(Color) ToDisplayName(Color) ToDisplayName(Color) ToDisplayName(Color)

Retrieves the display name of the specified color.

See Also