Struct DiscordColor
Represents a color used in Discord API.
Namespace: DisCatSharp.Entities
Assembly: DisCatSharp.dll
Syntax
public struct DiscordColor
Constructors
| Improve this Doc View SourceDiscordColor(Byte, Byte, Byte)
Creates a new color with specified values for red, green, and blue components.
Declaration
public DiscordColor(byte r, byte g, byte b)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | r | Value of the red component. |
System.Byte | g | Value of the green component. |
System.Byte | b | Value of the blue component. |
DiscordColor(Int32)
Creates a new color with specified value.
Declaration
public DiscordColor(int color)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | color | Value of the color. |
DiscordColor(Single, Single, Single)
Creates a new color with specified values for red, green, and blue components.
Declaration
public DiscordColor(float r, float g, float b)
Parameters
Type | Name | Description |
---|---|---|
System.Single | r | Value of the red component. |
System.Single | g | Value of the green component. |
System.Single | b | Value of the blue component. |
DiscordColor(String)
Creates a new color from specified string representation.
Declaration
public DiscordColor(string color)
Parameters
Type | Name | Description |
---|---|---|
System.String | color | String representation of the color. Must be 6 hexadecimal characters, optionally with # prefix. |
Properties
| Improve this Doc View SourceAquamarine
Aquamarine, or #00FFBF.
Declaration
public static readonly DiscordColor Aquamarine { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Azure
Azure, or #007FFF.
Declaration
public static readonly DiscordColor Azure { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
B
Gets the blue component of this color as an 8-bit integer.
Declaration
public readonly byte B { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Black
A near-black color. Due to API limitations, the color is #010101, rather than #000000, as the latter is treated as no color.
Declaration
public static readonly DiscordColor Black { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Blue
Blue, or #0000FF.
Declaration
public static readonly DiscordColor Blue { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Blurple
Discord Blurple, or #5865F2.
Declaration
public static readonly DiscordColor Blurple { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Brown
Brown, or #A52A2A.
Declaration
public static readonly DiscordColor Brown { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Chartreuse
Chartreuse, or #7FFF00.
Declaration
public static readonly DiscordColor Chartreuse { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
CornflowerBlue
Cornflower blue, or #6495ED.
Declaration
public static readonly DiscordColor CornflowerBlue { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Cyan
Cyan, or #00FFFF.
Declaration
public static readonly DiscordColor Cyan { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
DarkBlue
Dark blue, or #00007F.
Declaration
public static readonly DiscordColor DarkBlue { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
DarkGray
Dark gray, or #A9A9A9.
Declaration
public static readonly DiscordColor DarkGray { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
DarkGreen
Dark green, or #007F00.
Declaration
public static readonly DiscordColor DarkGreen { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
DarkRed
Dark red, or #7F0000.
Declaration
public static readonly DiscordColor DarkRed { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Fuchsia
Discord Fuchsia, or #EB459E.
Declaration
public static readonly DiscordColor Fuchsia { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
G
Gets the green component of this color as an 8-bit integer.
Declaration
public readonly byte G { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Gold
Gold, or #FFD700.
Declaration
public static readonly DiscordColor Gold { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Goldenrod
Goldenrod, or #DAA520.
Declaration
public static readonly DiscordColor Goldenrod { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Gray
Gray, or #808080.
Declaration
public static readonly DiscordColor Gray { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Green
Discord Green, or #57F287.
Declaration
public static readonly DiscordColor Green { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
HotPink
Hot pink, or #FF69B4
Declaration
public static readonly DiscordColor HotPink { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
IndianRed
Indian red, or #CD5C5C.
Declaration
public static readonly DiscordColor IndianRed { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
LightGray
Light gray, or #808080.
Declaration
public static readonly DiscordColor LightGray { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Lilac
Lilac, or #C8A2C8.
Declaration
public static readonly DiscordColor Lilac { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Magenta
Magenta, or #FF00FF.
Declaration
public static readonly DiscordColor Magenta { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
MidnightBlue
Midnight blue, or #191970.
Declaration
public static readonly DiscordColor MidnightBlue { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
None
Represents no color, or integer 0;
Declaration
public static readonly DiscordColor None { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Orange
Orange, or #FFA500.
Declaration
public static readonly DiscordColor Orange { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
PhthaloBlue
Phthalo blue, or #000F89.
Declaration
public static readonly DiscordColor PhthaloBlue { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
PhthaloGreen
Phthalo green, or #123524.
Declaration
public static readonly DiscordColor PhthaloGreen { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Purple
Purple, or #800080.
Declaration
public static readonly DiscordColor Purple { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
R
Gets the red component of this color as an 8-bit integer.
Declaration
public readonly byte R { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Red
Discord Red, or #ED4245.
Declaration
public static readonly DiscordColor Red { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Rose
Rose, or #FF007F.
Declaration
public static readonly DiscordColor Rose { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
SapGreen
Sap green, or #507D2A.
Declaration
public static readonly DiscordColor SapGreen { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Sienna
Sienna, or #882D17.
Declaration
public static readonly DiscordColor Sienna { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
SpringGreen
Spring green, or #00FF7F.
Declaration
public static readonly DiscordColor SpringGreen { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Teal
Teal, or #008080.
Declaration
public static readonly DiscordColor Teal { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Turquoise
Turquoise, or #30D5C8.
Declaration
public static readonly DiscordColor Turquoise { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Value
Gets the integer representation of this color.
Declaration
public readonly int Value { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
VeryDarkGray
Very dark gray, or #666666.
Declaration
public static readonly DiscordColor VeryDarkGray { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Violet
Violet, or #EE82EE.
Declaration
public static readonly DiscordColor Violet { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Wheat
Wheat, or #F5DEB3.
Declaration
public static readonly DiscordColor Wheat { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
White
White, or #FFFFFF.
Declaration
public static readonly DiscordColor White { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Yellow
Discord Yellow, or #FEE75C.
Declaration
public static readonly DiscordColor Yellow { get; }
Property Value
Type | Description |
---|---|
DiscordColor |
Methods
| Improve this Doc View SourceToString()
Gets a string representation of this color.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of this color. |
Overrides
Operators
| Improve this Doc View SourceImplicit(Int32 to DiscordColor)
Declaration
public static implicit operator DiscordColor(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
Returns
Type | Description |
---|---|
DiscordColor |