Color Color Color Color Struct

定义

表示一种 ARGB 颜色(alpha、红色、绿色、蓝色)。 Represents an ARGB (alpha, red, green, blue) color.

public value class Color
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public struct Color
type Color = struct
Public Structure Color
继承
属性

示例

下面的代码示例演示ARG,和B的属性Color,并且Implicit成员。The following code example demonstrates the A, R, G, and B properties of a Color, and the Implicit member.

此示例旨在与 Windows 窗体一起使用。This example is designed to be used with a Windows Form. 将代码粘贴到窗体并调用ShowPropertiesOfSlateBlue方法从窗体的Paint事件处理方法,传递e作为PaintEventArgsPaste the code into the form and call the ShowPropertiesOfSlateBlue method from the form's Paint event-handling method, passing e as PaintEventArgs.

void ShowPropertiesOfSlateBlue( PaintEventArgs^ e )
{
   Color slateBlue = Color::FromName( "SlateBlue" );
   Byte g = slateBlue.G;
   Byte b = slateBlue.B;
   Byte r = slateBlue.R;
   Byte a = slateBlue.A;
   array<Object^>^temp0 = {a,r,g,b};
   String^ text = String::Format( "Slate Blue has these ARGB values: Alpha:{0}, "
   "red:{1}, green: {2}, blue {3}", temp0 );
   e->Graphics->DrawString( text, gcnew System::Drawing::Font( this->Font,FontStyle::Italic ), gcnew SolidBrush( slateBlue ), RectangleF(PointF(0.0F,0.0F),this->Size) );
}
private void ShowPropertiesOfSlateBlue(PaintEventArgs e)
{
    Color slateBlue = Color.FromName("SlateBlue");
    byte g = slateBlue.G;
    byte b = slateBlue.B;
    byte r = slateBlue.R;
    byte a = slateBlue.A;
    string text = String.Format("Slate Blue has these ARGB values: Alpha:{0}, " +
        "red:{1}, green: {2}, blue {3}", new object[]{a, r, g, b});
    e.Graphics.DrawString(text, 
        new Font(this.Font, FontStyle.Italic), 
        new SolidBrush(slateBlue), 
        new RectangleF(new PointF(0.0F, 0.0F), this.Size));
}
Private Sub ShowPropertiesOfSlateBlue(ByVal e As PaintEventArgs)
    Dim slateBlue As Color = Color.FromName("SlateBlue")
    Dim g As Byte = slateBlue.G
    Dim b As Byte = slateBlue.B
    Dim r As Byte = slateBlue.R
    Dim a As Byte = slateBlue.A
    Dim text As String = _
    String.Format("Slate Blue has these ARGB values: Alpha:{0}, " _
       & "red:{1}, green: {2}, blue {3}", New Object() {a, r, g, b})
    e.Graphics.DrawString(text, New Font(Me.Font, FontStyle.Italic), _
        New SolidBrush(slateBlue), _
        New RectangleF(New PointF(0.0F, 0.0F), _
        Size.op_Implicit(Me.Size)))
End Sub

注解

使用的属性来表示已命名的颜色Color结构。Named colors are represented by using the properties of the Color structure. 有关这些颜色的详细信息,请参阅按名称的颜色For more information about these colors, see Colors by Name.

每个像素的颜色表示为一个 32 位数字: 8 位 alpha、 红色、 绿色和蓝色 (ARGB) 为每个。The color of each pixel is represented as a 32-bit number: 8 bits each for alpha, red, green, and blue (ARGB). 每四个组件是一个介于 0 到 255 之间,其中 0 表示没有亮度,255 表示最大亮度。Each of the four components is a number from 0 through 255, with 0 representing no intensity and 255 representing full intensity. Alpha 分量指定颜色的透明度: 0 表示完全透明,255 表示完全不透明。The alpha component specifies the transparency of the color: 0 is fully transparent, and 255 is fully opaque. 若要确定 alpha、 红色、 绿色还是蓝色组件的一种颜色,请使用ARG,或B属性,分别。To determine the alpha, red, green, or blue component of a color, use the A, R, G, or B property, respectively. 可以使用其中一个来创建自定义颜色FromArgb方法。You can create a custom color by using one of the FromArgb methods.

字段

Empty Empty Empty Empty

表示值为 null 的颜色。 Represents a color that is null.

属性

A A A A

获取此 Color 结构的 alpha 组件值。 Gets the alpha component value of this Color structure.

AliceBlue AliceBlue AliceBlue AliceBlue

获取 ARGB 值为 #FFF0F8FF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFF0F8FF.

AntiqueWhite AntiqueWhite AntiqueWhite AntiqueWhite

获取 ARGB 值为 #FFFAEBD7 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFAEBD7.

Aqua Aqua Aqua Aqua

获取 ARGB 值为 #FF00FFFF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF00FFFF.

Aquamarine Aquamarine Aquamarine Aquamarine

获取 ARGB 值为 #FF7FFFD4 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF7FFFD4.

Azure Azure Azure Azure

获取 ARGB 值为 #FFF0FFFF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFF0FFFF.

B B B B

获取此 Color 结构的蓝色组件值。 Gets the blue component value of this Color structure.

Beige Beige Beige Beige

获取 ARGB 值为 #FFF5F5DC 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFF5F5DC.

Bisque Bisque Bisque Bisque

获取 ARGB 值为 #FFFFE4C4 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFFE4C4.

Black Black Black Black

获取 ARGB 值为 #FF000000 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF000000.

BlanchedAlmond BlanchedAlmond BlanchedAlmond BlanchedAlmond

获取 ARGB 值为 #FFFFEBCD 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFFEBCD.

Blue Blue Blue Blue

获取 ARGB 值为 #FF0000FF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF0000FF.

BlueViolet BlueViolet BlueViolet BlueViolet

获取 ARGB 值为 #FF8A2BE2 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF8A2BE2.

Brown Brown Brown Brown

获取 ARGB 值为 #FFA52A2A 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFA52A2A.

BurlyWood BurlyWood BurlyWood BurlyWood

获取 ARGB 值为 #FFDEB887 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFDEB887.

CadetBlue CadetBlue CadetBlue CadetBlue

获取 ARGB 值为 #FF5F9EA0 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF5F9EA0.

Chartreuse Chartreuse Chartreuse Chartreuse

获取 ARGB 值为 #FF7FFF00 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF7FFF00.

Chocolate Chocolate Chocolate Chocolate

获取 ARGB 值为 #FFD2691E 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFD2691E.

Coral Coral Coral Coral

获取 ARGB 值为 #FFFF7F50 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFF7F50.

CornflowerBlue CornflowerBlue CornflowerBlue CornflowerBlue

获取 ARGB 值为 #FF6495ED 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF6495ED.

Cornsilk Cornsilk Cornsilk Cornsilk

获取 ARGB 值为 #FFFFF8DC 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFFF8DC.

Crimson Crimson Crimson Crimson

获取 ARGB 值为 #FFDC143C 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFDC143C.

Cyan Cyan Cyan Cyan

获取 ARGB 值为 #FF00FFFF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF00FFFF.

DarkBlue DarkBlue DarkBlue DarkBlue

获取 ARGB 值为 #FF00008B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF00008B.

DarkCyan DarkCyan DarkCyan DarkCyan

获取 ARGB 值为 #FF008B8B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF008B8B.

DarkGoldenrod DarkGoldenrod DarkGoldenrod DarkGoldenrod

获取 ARGB 值为 #FFB8860B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFB8860B.

DarkGray DarkGray DarkGray DarkGray

获取 ARGB 值为 #FFA9A9A9 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFA9A9A9.

DarkGreen DarkGreen DarkGreen DarkGreen

获取 ARGB 值为 #FF006400 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF006400.

DarkKhaki DarkKhaki DarkKhaki DarkKhaki

获取 ARGB 值为 #FFBDB76B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFBDB76B.

DarkMagenta DarkMagenta DarkMagenta DarkMagenta

获取 ARGB 值为 #FF8B008B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF8B008B.

DarkOliveGreen DarkOliveGreen DarkOliveGreen DarkOliveGreen

获取 ARGB 值为 #FF556B2F 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF556B2F.

DarkOrange DarkOrange DarkOrange DarkOrange

获取 ARGB 值为 #FFFF8C00 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFF8C00.

DarkOrchid DarkOrchid DarkOrchid DarkOrchid

获取 ARGB 值为 #FF9932CC 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF9932CC.

DarkRed DarkRed DarkRed DarkRed

获取 ARGB 值为 #FF8B0000 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF8B0000.

DarkSalmon DarkSalmon DarkSalmon DarkSalmon

获取 ARGB 值为 #FFE9967A 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFE9967A.

DarkSeaGreen DarkSeaGreen DarkSeaGreen DarkSeaGreen

获取 ARGB 值为 #FF8FBC8F 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF8FBC8F.

DarkSlateBlue DarkSlateBlue DarkSlateBlue DarkSlateBlue

获取 ARGB 值为 #FF483D8B 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF483D8B.

DarkSlateGray DarkSlateGray DarkSlateGray DarkSlateGray

获取 ARGB 值为 #FF2F4F4F 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF2F4F4F.

DarkTurquoise DarkTurquoise DarkTurquoise DarkTurquoise

获取 ARGB 值为 #FF00CED1 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF00CED1.

DarkViolet DarkViolet DarkViolet DarkViolet

获取 ARGB 值为 #FF9400D3 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF9400D3.

DeepPink DeepPink DeepPink DeepPink

获取 ARGB 值为 #FFFF1493 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFF1493.

DeepSkyBlue DeepSkyBlue DeepSkyBlue DeepSkyBlue

获取 ARGB 值为 #FF00BFFF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF00BFFF.

DimGray DimGray DimGray DimGray

获取 ARGB 值为 #FF696969 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF696969.

DodgerBlue DodgerBlue DodgerBlue DodgerBlue

获取 ARGB 值为 #FF1E90FF 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF1E90FF.

Firebrick Firebrick Firebrick Firebrick

获取 ARGB 值为 #FFB22222 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFB22222.

FloralWhite FloralWhite FloralWhite FloralWhite

获取 ARGB 值为 #FFFFFAF0 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FFFFFAF0.

ForestGreen ForestGreen ForestGreen ForestGreen

获取 ARGB 值为 #FF228B22 的系统定义的颜色 Gets a system-defined color that has an ARGB value of #FF228B22.

Fuchsia Fuchsia Fuchsia Fuchsia

获取 ARGB 值为 #FFFF00FF 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF00FF.

G G G G

获取此 Color 结构的绿色组件值。 Gets the green component value of this Color structure.

Gainsboro Gainsboro Gainsboro Gainsboro

获取 ARGB 值为 #FFDCDCDC 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFDCDCDC.

GhostWhite GhostWhite GhostWhite GhostWhite

获取 ARGB 值为 #FFF8F8FF 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF8F8FF.

Gold Gold Gold Gold

获取 ARGB 值为 #FFFFD700 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFD700.

Goldenrod Goldenrod Goldenrod Goldenrod

获取 ARGB 值为 #FFDAA520 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFDAA520.

Gray Gray Gray Gray

获取 ARGB 值为 #FF808080 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF808080.

Green Green Green Green

获取 ARGB 值为 #FF008000 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF008000.

GreenYellow GreenYellow GreenYellow GreenYellow

获取 ARGB 值为 #FFADFF2F 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFADFF2F.

Honeydew Honeydew Honeydew Honeydew

获取 ARGB 值为 #FFF0FFF0 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF0FFF0.

HotPink HotPink HotPink HotPink

获取 ARGB 值为 #FFFF69B4 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF69B4.

IndianRed IndianRed IndianRed IndianRed

获取 ARGB 值为 #FFCD5C5C 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFCD5C5C.

Indigo Indigo Indigo Indigo

获取 ARGB 值为 #FF4B0082 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF4B0082.

IsEmpty IsEmpty IsEmpty IsEmpty

指定是否取消初始化此 Color 结构。 Specifies whether this Color structure is uninitialized.

IsKnownColor IsKnownColor IsKnownColor IsKnownColor

获取指示此 Color 结构是否为预定义颜色的值。 Gets a value indicating whether this Color structure is a predefined color. 预定义颜色由 KnownColor 枚举的元素表示。 Predefined colors are represented by the elements of the KnownColor enumeration.

IsNamedColor IsNamedColor IsNamedColor IsNamedColor

获取指示此 Color 结构是命名颜色还是 KnownColor 枚举成员的值。 Gets a value indicating whether this Color structure is a named color or a member of the KnownColor enumeration.

IsSystemColor IsSystemColor IsSystemColor IsSystemColor

获取指示此 Color 结构是否为系统颜色的值。 Gets a value indicating whether this Color structure is a system color. 系统颜色是指 Windows 显示元素中使用的颜色。 A system color is a color that is used in a Windows display element. 系统颜色由 KnownColor 枚举的元素来表示。 System colors are represented by elements of the KnownColor enumeration.

Ivory Ivory Ivory Ivory

获取 ARGB 值为 #FFFFFFF0 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFFF0.

Khaki Khaki Khaki Khaki

获取 ARGB 值为 #FFF0E68C 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF0E68C.

Lavender Lavender Lavender Lavender

获取 ARGB 值为 #FFE6E6FA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFE6E6FA.

LavenderBlush LavenderBlush LavenderBlush LavenderBlush

获取 ARGB 值为 #FFFFF0F5 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFF0F5.

LawnGreen LawnGreen LawnGreen LawnGreen

获取 ARGB 值为 #FF7CFC00 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF7CFC00.

LemonChiffon LemonChiffon LemonChiffon LemonChiffon

获取 ARGB 值为 #FFFFFACD 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFACD.

LightBlue LightBlue LightBlue LightBlue

获取 ARGB 值为 #FFADD8E6 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFADD8E6.

LightCoral LightCoral LightCoral LightCoral

获取 ARGB 值为 #FFF08080 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF08080.

LightCyan LightCyan LightCyan LightCyan

获取 ARGB 值为 #FFE0FFFF 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFE0FFFF.

LightGoldenrodYellow LightGoldenrodYellow LightGoldenrodYellow LightGoldenrodYellow

获取 ARGB 值为 #FFFAFAD2 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFAFAD2.

LightGray LightGray LightGray LightGray

获取 ARGB 值为 #FFD3D3D3 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFD3D3D3.

LightGreen LightGreen LightGreen LightGreen

获取 ARGB 值为 #FF90EE90 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF90EE90.

LightPink LightPink LightPink LightPink

获取 ARGB 值为 #FFFFB6C1 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFB6C1.

LightSalmon LightSalmon LightSalmon LightSalmon

获取 ARGB 值为 #FFFFA07A 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFA07A.

LightSeaGreen LightSeaGreen LightSeaGreen LightSeaGreen

获取 ARGB 值为 #FF20B2AA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF20B2AA.

LightSkyBlue LightSkyBlue LightSkyBlue LightSkyBlue

获取 ARGB 值为 #FF87CEFA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF87CEFA.

LightSlateGray LightSlateGray LightSlateGray LightSlateGray

获取 ARGB 值为 #FF778899 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF778899.

LightSteelBlue LightSteelBlue LightSteelBlue LightSteelBlue

获取 ARGB 值为 #FFB0C4DE 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFB0C4DE.

LightYellow LightYellow LightYellow LightYellow

获取 ARGB 值为 #FFFFFFE0 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFFE0.

Lime Lime Lime Lime

获取 ARGB 值为 #FF00FF00 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF00FF00.

LimeGreen LimeGreen LimeGreen LimeGreen

获取 ARGB 值为 #FF32CD32 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF32CD32.

Linen Linen Linen Linen

获取 ARGB 值为 #FFFAF0E6 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFAF0E6.

Magenta Magenta Magenta Magenta

获取 ARGB 值为 #FFFF00FF 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF00FF.

Maroon Maroon Maroon Maroon

获取 ARGB 值为 #FF800000 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF800000.

MediumAquamarine MediumAquamarine MediumAquamarine MediumAquamarine

获取 ARGB 值为 #FF66CDAA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF66CDAA.

MediumBlue MediumBlue MediumBlue MediumBlue

获取 ARGB 值为 #FF0000CD 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF0000CD.

MediumOrchid MediumOrchid MediumOrchid MediumOrchid

获取 ARGB 值为 #FFBA55D3 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFBA55D3.

MediumPurple MediumPurple MediumPurple MediumPurple

获取 ARGB 值为 #FF9370DB 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF9370DB.

MediumSeaGreen MediumSeaGreen MediumSeaGreen MediumSeaGreen

获取 ARGB 值为 #FF3CB371 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF3CB371.

MediumSlateBlue MediumSlateBlue MediumSlateBlue MediumSlateBlue

获取 ARGB 值为 #FF7B68EE 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF7B68EE.

MediumSpringGreen MediumSpringGreen MediumSpringGreen MediumSpringGreen

获取 ARGB 值为 #FF00FA9A 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF00FA9A.

MediumTurquoise MediumTurquoise MediumTurquoise MediumTurquoise

获取 ARGB 值为 #FF48D1CC 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF48D1CC.

MediumVioletRed MediumVioletRed MediumVioletRed MediumVioletRed

获取 ARGB 值为 #FFC71585 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFC71585.

MidnightBlue MidnightBlue MidnightBlue MidnightBlue

获取 ARGB 值为 #FF191970 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF191970.

MintCream MintCream MintCream MintCream

获取 ARGB 值为 #FFF5FFFA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF5FFFA.

MistyRose MistyRose MistyRose MistyRose

获取 ARGB 值为 #FFFFE4E1 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFE4E1.

Moccasin Moccasin Moccasin Moccasin

获取 ARGB 值为 #FFFFE4B5 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFE4B5.

Name Name Name Name

获取此 Color 的名称。 Gets the name of this Color.

NavajoWhite NavajoWhite NavajoWhite NavajoWhite

获取 ARGB 值为 #FFFFDEAD 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFDEAD.

Navy Navy Navy Navy

获取 ARGB 值为 #FF000080 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF000080.

OldLace OldLace OldLace OldLace

获取 ARGB 值为 #FFFDF5E6 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFDF5E6.

Olive Olive Olive Olive

获取 ARGB 值为 #FF808000 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF808000.

OliveDrab OliveDrab OliveDrab OliveDrab

获取 ARGB 值为 #FF6B8E23 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF6B8E23.

Orange Orange Orange Orange

获取 ARGB 值为 #FFFFA500 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFA500.

OrangeRed OrangeRed OrangeRed OrangeRed

获取 ARGB 值为 #FFFF4500 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF4500.

Orchid Orchid Orchid Orchid

获取 ARGB 值为 #FFDA70D6 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFDA70D6.

PaleGoldenrod PaleGoldenrod PaleGoldenrod PaleGoldenrod

获取 ARGB 值为 #FFEEE8AA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFEEE8AA.

PaleGreen PaleGreen PaleGreen PaleGreen

获取 ARGB 值为 #FF98FB98 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF98FB98.

PaleTurquoise PaleTurquoise PaleTurquoise PaleTurquoise

获取 ARGB 值为 #FFAFEEEE 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFAFEEEE.

PaleVioletRed PaleVioletRed PaleVioletRed PaleVioletRed

获取 ARGB 值为 #FFDB7093 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFDB7093.

PapayaWhip PapayaWhip PapayaWhip PapayaWhip

获取 ARGB 值为 #FFFFEFD5 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFEFD5.

PeachPuff PeachPuff PeachPuff PeachPuff

获取 ARGB 值为 #FFFFDAB9 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFDAB9.

Peru Peru Peru Peru

获取 ARGB 值为 #FFCD853F 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFCD853F.

Pink Pink Pink Pink

获取 ARGB 值为 #FFFFC0CB 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFC0CB.

Plum Plum Plum Plum

获取 ARGB 值为 #FFDDA0DD 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFDDA0DD.

PowderBlue PowderBlue PowderBlue PowderBlue

获取 ARGB 值为 #FFB0E0E6 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFB0E0E6.

Purple Purple Purple Purple

获取 ARGB 值为 #FF800080 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF800080.

R R R R

获取此 Color 结构的红色组件值。 Gets the red component value of this Color structure.

Red Red Red Red

获取 ARGB 值为 #FFFF0000 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF0000.

RosyBrown RosyBrown RosyBrown RosyBrown

获取 ARGB 值为 #FFBC8F8F 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFBC8F8F.

RoyalBlue RoyalBlue RoyalBlue RoyalBlue

获取 ARGB 值为 #FF4169E1 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF4169E1.

SaddleBrown SaddleBrown SaddleBrown SaddleBrown

获取 ARGB 值为 #FF8B4513 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF8B4513.

Salmon Salmon Salmon Salmon

获取 ARGB 值为 #FFFA8072 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFA8072.

SandyBrown SandyBrown SandyBrown SandyBrown

获取 ARGB 值为 #FFF4A460 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF4A460.

SeaGreen SeaGreen SeaGreen SeaGreen

获取 ARGB 值为 #FF2E8B57 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF2E8B57.

SeaShell SeaShell SeaShell SeaShell

获取 ARGB 值为 #FFFFF5EE 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFF5EE.

Sienna Sienna Sienna Sienna

获取 ARGB 值为 #FFA0522D 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFA0522D.

Silver Silver Silver Silver

获取 ARGB 值为 #FFC0C0C0 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFC0C0C0.

SkyBlue SkyBlue SkyBlue SkyBlue

获取 ARGB 值为 #FF87CEEB 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF87CEEB.

SlateBlue SlateBlue SlateBlue SlateBlue

获取 ARGB 值为 #FF6A5ACD 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF6A5ACD.

SlateGray SlateGray SlateGray SlateGray

获取 ARGB 值为 #FF708090 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF708090.

Snow Snow Snow Snow

获取 ARGB 值为 #FFFFFAFA 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFAFA.

SpringGreen SpringGreen SpringGreen SpringGreen

获取 ARGB 值为 #FF00FF7F 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF00FF7F.

SteelBlue SteelBlue SteelBlue SteelBlue

获取 ARGB 值为 #FF4682B4 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF4682B4.

Tan Tan Tan Tan

获取 ARGB 值为 #FFD2B48C 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFD2B48C.

Teal Teal Teal Teal

获取 ARGB 值为 #FF008080 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF008080.

Thistle Thistle Thistle Thistle

获取 ARGB 值为 #FFD8BFD8 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFD8BFD8.

Tomato Tomato Tomato Tomato

获取 ARGB 值为 #FFFF6347 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFF6347.

Transparent Transparent Transparent Transparent

获取系统定义的颜色。 Gets a system-defined color.

Turquoise Turquoise Turquoise Turquoise

获取 ARGB 值为 #FF40E0D0 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF40E0D0.

Violet Violet Violet Violet

获取 ARGB 值为 #FFEE82EE 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFEE82EE.

Wheat Wheat Wheat Wheat

获取 ARGB 值为 #FFF5DEB3 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF5DEB3.

White White White White

获取 ARGB 值为 #FFFFFFFF 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFFFF.

WhiteSmoke WhiteSmoke WhiteSmoke WhiteSmoke

获取 ARGB 值为 #FFF5F5F5 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFF5F5F5.

Yellow Yellow Yellow Yellow

获取 ARGB 值为 #FFFFFF00 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FFFFFF00.

YellowGreen YellowGreen YellowGreen YellowGreen

获取 ARGB 值为 #FF9ACD32 的系统定义颜色 Gets a system-defined color that has an ARGB value of #FF9ACD32.

方法

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

测试指定的对象是否为 Color 结构并等效于此 Color 结构。 Tests whether the specified object is a Color structure and is equivalent to this Color structure.

FromArgb(Int32, Int32, Int32, Int32) FromArgb(Int32, Int32, Int32, Int32) FromArgb(Int32, Int32, Int32, Int32) FromArgb(Int32, Int32, Int32, Int32)

基于四个 ARGB 组件(alpha、红色、绿色和蓝色)值创建 Color 结构。 Creates a Color structure from the four ARGB component (alpha, red, green, and blue) values. 尽管此方法允许为每个组件传递 32 位值,但每个组件的值仅限于 8 位。 Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.

FromArgb(Int32, Int32, Int32) FromArgb(Int32, Int32, Int32) FromArgb(Int32, Int32, Int32) FromArgb(Int32, Int32, Int32)

基于指定的 8 位颜色值(红色、绿色和蓝色)创建 Color 结构。 Creates a Color structure from the specified 8-bit color values (red, green, and blue). 隐式的 alpha 值为 255(完全不透明)。 The alpha value is implicitly 255 (fully opaque). 尽管此方法允许为每个颜色组件传递 32 位值,但每个组件的值仅限于 8 位。 Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.

FromArgb(Int32, Color) FromArgb(Int32, Color) FromArgb(Int32, Color) FromArgb(Int32, Color)

从指定的 Color 结构创建 Color 结构,但要使用新指定的 alpha 值。 Creates a Color structure from the specified Color structure, but with the new specified alpha value. 尽管此方法允许为 alpha 值传递 32 位值,但该值仅限于 8 位。 Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits.

FromArgb(Int32) FromArgb(Int32) FromArgb(Int32) FromArgb(Int32)

基于一个 32 位 ARGB 值创建 Color 结构。 Creates a Color structure from a 32-bit ARGB value.

FromKnownColor(KnownColor) FromKnownColor(KnownColor) FromKnownColor(KnownColor) FromKnownColor(KnownColor)

基于指定的预定义颜色创建 Color 结构。 Creates a Color structure from the specified predefined color.

FromName(String) FromName(String) FromName(String) FromName(String)

基于预定义颜色的指定名称创建 Color 结构。 Creates a Color structure from the specified name of a predefined color.

GetBrightness() GetBrightness() GetBrightness() GetBrightness()

获取此 Color 结构的“色调-饱和度-亮度”(HSL) 的亮度值。 Gets the hue-saturation-lightness (HSL) lightness value for this Color structure.

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

返回此 Color 结构的哈希代码。 Returns a hash code for this Color structure.

GetHue() GetHue() GetHue() GetHue()

获取此 Color 结构的“色调-饱和度-亮度”(HSL) 的色调值,以度为单位。 Gets the hue-saturation-lightness (HSL) hue value, in degrees, for this Color structure.

GetSaturation() GetSaturation() GetSaturation() GetSaturation()

获取此 Color 结构的“色调-饱和度-亮度”(HSL) 的饱和度值。 Gets the hue-saturation-lightness (HSL) saturation value for this Color structure.

ToArgb() ToArgb() ToArgb() ToArgb()

获取此 Color 结构的 32 位 ARGB 值。 Gets the 32-bit ARGB value of this Color structure.

ToKnownColor() ToKnownColor() ToKnownColor() ToKnownColor()

获取此 Color 结构的 KnownColor 值。 Gets the KnownColor value of this Color structure.

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

将此 Color 结构转换为用户可读的字符串。 Converts this Color structure to a human-readable string.

操作员

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

测试两个指定的 Color 结构是否等效。 Tests whether two specified Color structures are equivalent.

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

测试两个指定的 Color 结构是否不同。 Tests whether two specified Color structures are different.

适用于

另请参阅