Struct RoleColors
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
Represents the full color configuration of a role.
public readonly record struct RoleColors : IEquatable<RoleColors>
- Implements
- Inherited Members
Constructors
RoleColors(Color, Color?, Color?)
Represents the full color configuration of a role.
public RoleColors(Color PrimaryColor, Color? SecondaryColor = null, Color? TertiaryColor = null)
Parameters
PrimaryColorColorThe primary (or main) color of the role.
SecondaryColorColor?The secondary color of the role, this will make the role a gradient between the other provided colors.
TertiaryColorColor?The tertiary color of the role, this will turn the gradient into a holographic style.
Fields
Holographic
A holographic RoleColors.
public static readonly RoleColors Holographic
Field Value
Properties
IsGradient
Gets whether this RoleColors is a gradient between 2 colors.
public bool IsGradient { get; }
Property Value
IsHolographic
Gets whether this color is the Holographic color.
public bool IsHolographic { get; }
Property Value
IsSolidColor
Gets whether this RoleColors is a single, solid color.
public bool IsSolidColor { get; }
Property Value
PrimaryColor
The primary (or main) color of the role.
public Color PrimaryColor { get; init; }
Property Value
SecondaryColor
The secondary color of the role, this will make the role a gradient between the other provided colors.
public Color? SecondaryColor { get; init; }
Property Value
TertiaryColor
The tertiary color of the role, this will turn the gradient into a holographic style.
public Color? TertiaryColor { get; init; }
Property Value
Methods
Gradient(Color, Color)
Creates a new RoleColors representing a gradient between 2 colors.
public static RoleColors Gradient(Color primary, Color secondary)
Parameters
primaryColorThe primary color of the gradient.
secondaryColorThe secondary color of the gradient.
Returns
- RoleColors
A new RoleColors representing the gradient between the 2 supplied colors.
Solid(Color)
Creates a new RoleColors representing a single, solid color.
public static RoleColors Solid(Color color)
Parameters
colorColorThe solid color to use to construct the new RoleColors.
Returns
- RoleColors
A new RoleColors representing the supplied color.
Operators
implicit operator RoleColors(Color)
public static implicit operator RoleColors(Color color)
Parameters
colorColor
Returns
implicit operator RoleColors?(Color?)
public static implicit operator RoleColors?(Color? color)
Parameters
colorColor?
Returns
implicit operator RoleColors?(uint?)
public static implicit operator RoleColors?(uint? color)
Parameters
coloruint?
Returns
implicit operator RoleColors(uint)
public static implicit operator RoleColors(uint color)
Parameters
coloruint