Color Color Color Color Struct

Definition

Describes a color in terms of alpha, red, green, and blue channels.

public value class Color : IFormattable
[System.Security.SecurityCritical]
public struct Color : IFormattable
type Color = struct
    interface IFormattable
Public Structure Color
Implements IFormattable
Inheritance
Attributes
Implements

Remarks

This struct represents the .NET projection of the Windows Runtime (WinRT) Color struct. For more information, see Color in the UWP API reference.

Properties

A A A A

Gets or sets the sRGB alpha channel value of the color.

B B B B

Gets or sets the sRGB blue channel value of the color.

G G G G

Gets or sets the sRGB green channel value of the color.

R R R R

Gets or sets the sRGB red channel value of the color.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Tests whether the specified object is a Color struct and is equivalent to the current color.

Equals(Color) Equals(Color) Equals(Color) Equals(Color)

Tests whether the specified Color struct is identical to the current color.

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

Creates a new Color struct by using the specified sRGB alpha channel and color channel values.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gets a hash code for the current Color struct.

ToString() ToString() ToString() ToString()

Creates a string representation of the color using the ARGB channels in hex notation.

ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

Creates a string representation of the color by using the ARGB channels and the specified format provider.

Operators

Equality(Color, Color) Equality(Color, Color) Equality(Color, Color) Equality(Color, Color)

Tests whether two Color structs are identical.

Inequality(Color, Color) Inequality(Color, Color) Inequality(Color, Color) Inequality(Color, Color)

Tests whether two Color structs are not identical.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

For a description of this member, see ToString(String, IFormatProvider).

Applies to

See also