Uređivanje

Dijeli putem


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
[<System.Security.SecurityCritical>]
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

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

B

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

G

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

R

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

Methods

Equals(Color)

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

Equals(Object)

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

FromArgb(Byte, Byte, Byte, Byte)

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

GetHashCode()

Gets a hash code for the current Color struct.

ToString()

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

ToString(IFormatProvider)

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

Operators

Equality(Color, Color)

Tests whether two Color structs are identical.

Inequality(Color, Color)

Tests whether two Color structs are not identical.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)

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

Applies to

See also