Table of Contents

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

PrimaryColor Color

The primary (or main) color of the role.

SecondaryColor Color?

The secondary color of the role, this will make the role a gradient between the other provided colors.

TertiaryColor Color?

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

RoleColors

Properties

IsGradient

Gets whether this RoleColors is a gradient between 2 colors.

public bool IsGradient { get; }

Property Value

bool

IsHolographic

Gets whether this color is the Holographic color.

public bool IsHolographic { get; }

Property Value

bool

IsSolidColor

Gets whether this RoleColors is a single, solid color.

public bool IsSolidColor { get; }

Property Value

bool

PrimaryColor

The primary (or main) color of the role.

public Color PrimaryColor { get; init; }

Property Value

Color

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

Color?

TertiaryColor

The tertiary color of the role, this will turn the gradient into a holographic style.

public Color? TertiaryColor { get; init; }

Property Value

Color?

Methods

Gradient(Color, Color)

Creates a new RoleColors representing a gradient between 2 colors.

public static RoleColors Gradient(Color primary, Color secondary)

Parameters

primary Color

The primary color of the gradient.

secondary Color

The 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

color Color

The 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

color Color

Returns

RoleColors

implicit operator RoleColors?(Color?)

public static implicit operator RoleColors?(Color? color)

Parameters

color Color?

Returns

RoleColors?

implicit operator RoleColors?(uint?)

public static implicit operator RoleColors?(uint? color)

Parameters

color uint?

Returns

RoleColors?

implicit operator RoleColors(uint)

public static implicit operator RoleColors(uint color)

Parameters

color uint

Returns

RoleColors