Color Color Color Color Struct

定義

根據 Alpha、紅、綠、藍色板描述色彩。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
繼承
屬性
實作

備註

這個結構代表 Windows 執行階段 (WinRT) Color結構的 .net 投射。This struct represents the .NET projection of the Windows Runtime (WinRT) Color struct. 如需詳細資訊, 請參閱 UWP API 參考中的色彩For more information, see Color in the UWP API reference.

屬性

A A A A

取得或設定色彩的 sRGB Alpha 色頻值。Gets or sets the sRGB alpha channel value of the color.

B B B B

取得或設定色彩的 sRGB 藍色色頻值。Gets or sets the sRGB blue channel value of the color.

G G G G

取得或設定色彩的 sRGB 綠色色頻值。Gets or sets the sRGB green channel value of the color.

R R R R

取得或設定色彩的 sRGB 紅色色頻值。Gets or sets the sRGB red channel value of the color.

方法

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

測試所指定物件是否為 Color 結構,以及是否相當於目前的色彩。Tests whether the specified object is a Color struct and is equivalent to the current color.

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

測試所指定 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)

使用所指定 sRGB Alpha 色板和色板值建立新的 Color 結構。Creates a new Color struct by using the specified sRGB alpha channel and color channel values.

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

取得目前 Color 結構的雜湊程式碼。Gets a hash code for the current Color struct.

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

使用 ARGB 色板建立色彩的字串表示 (以十六進位標記法表示)。Creates a string representation of the color using the ARGB channels in hex notation.

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

使用 ARGB 色板和所指定格式提供者來建立色彩的字串表示。Creates a string representation of the color by using the ARGB channels and the specified format provider.

運算子

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

測試兩個 Color 結構是否相等。Tests whether two Color structs are identical.

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

測試兩個 Color 結構是否不相等。Tests whether two Color structs are not identical.

明確介面實作

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

如需這個成員的說明,請參閱 ToString(String, IFormatProvider)For a description of this member, see ToString(String, IFormatProvider).

適用於

另請參閱