ColorHelper class

Applies to Windows and Windows Phone

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

Syntax


var colorHelper = Windows.UI.ColorHelper;

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The ColorHelper class has these types of members:

Methods

The ColorHelper class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

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

 

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 Windows Store 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 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 Visual Basic can use directly on Color as nondata members are available from the ColorHelper class.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.UI
Windows::UI [C++]

Metadata

Windows.winmd

See also

Color
Color.FromArgb
Colors
SolidColorBrush

 

 

Show:
© 2014 Microsoft