Colour

discord_http.colour module

class discord_http.colour.Color(value: int)[source]

Bases: Colour

Alias for Colour

class discord_http.colour.Colour(value: int)[source]

Bases: object

classmethod alizarin() Self[source]

Colour: Returns the alizarin colour

classmethod amethyst() Self[source]

Colour: Returns the amethyst colour

property b: int

Returns the blue component of the colour

Type:

int

classmethod belize_hole() Self[source]

Colour: Returns the belize hole colour

classmethod blue_sentinel() Self[source]

Colour: Returns the blue sentinel colour

classmethod carrot() Self[source]

Colour: Returns the carrot colour

classmethod default() Self[source]

Colour: Returns the default colour (#000000, Black)

classmethod dusty_sky() Self[source]

Colour: Returns the dusty sky colour

classmethod emerald() Self[source]

Colour: Returns the emerald colour

classmethod from_hex(hex: str) Self[source]

Creates a Colour object from a hex string

Parameters:

hex (str) – The hex string to convert

Returns:

The colour object

Return type:

Colour

Raises:

ValueError – Invalid hex colour

classmethod from_rgb(r: int, g: int, b: int) Self[source]

Creates a Colour object from RGB values

Parameters:
  • r (int) – Red value

  • g (int) – Green value

  • b (int) – Blue value

Returns:

The colour object

Return type:

Colour

property g: int

Returns the green component of the colour

Type:

int

classmethod green_sea() Self[source]

Colour: Returns the green sea colour

classmethod harrison_grey() Self[source]

Colour: Returns the harrison grey colour

classmethod mellow_melon() Self[source]

Colour: Returns the mellow melon colour

classmethod nephritis() Self[source]

Colour: Returns the nephritis colour

classmethod orange() Self[source]

Colour: Returns the orange colour

classmethod peter_river() Self[source]

Colour: Returns the peter river colour

classmethod plum_perfect() Self[source]

Colour: Returns the plum perfect colour

classmethod pomegranate() Self[source]

Colour: Returns the pomegranate colour

classmethod pumpkin() Self[source]

Colour: Returns the pumpkin colour

property r: int

Returns the red component of the colour

Type:

int

classmethod random(*, seed: Any | None = None) Self[source]

Creates a random colour

Parameters:

seed (Optional[Any]) – The seed to use for the random colour to make it deterministic

Returns:

The random colour

Return type:

Colour

classmethod sun_flower() Self[source]

Colour: Returns the sun flower colour

to_hex() str[source]

str: Returns the hex value of the colour

to_rgb() tuple[int, int, int][source]

tuple[int, int, int]: Returns the RGB values of the colour`

classmethod turquoise() Self[source]

Colour: Returns the turquoise colour

classmethod whale_shark() Self[source]

Colour: Returns the whale shark colour

classmethod wisteria() Self[source]

Colour: Returns the wisteria colour