DiscordColor class

A 24-bit RGB color.

Constructors

DiscordColor(int value)
Create a DiscordColor from a 24 bit encoded value.
const
DiscordColor.fromRgb(int r, int g, int b)
Create a DiscordColor from r, g and b channels ranging from 0 to 255 combined.
const
DiscordColor.fromScaledRgb(double r, double g, double b)
Create a DiscordColor from r, g and b channels ranging from 0.0 to 1.0 combined.
factory
DiscordColor.parseHexString(String color)
Parse a string value to a DiscordColor.
factory

Properties

b int
The blue channel of this color.
no setter
g int
The green channel of this color.
no setter
hashCode int
The hash code for this object.
no setteroverride
r int
The red channel of this color.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The 24 bit encoding of this color.
final

Methods

copyWith({int? r, int? g, int? b}) DiscordColor
Create a new DiscordColor identical to this one with one or more channels replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHexString() String
Convert this DiscordColor to a hexadecimal string that can be parsed with DiscordColor.parseHexString.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override