Colour

discord_http.colour module

class discord_http.colour.Color(value)

Bases: Colour

Alias for Colour.

Parameters:

value (int)

class discord_http.colour.Colour(value)

Bases: object

Parameters:

value (int)

classmethod alizarin() Self

Returns the alizarin colour.

Return type:

Self

classmethod amethyst() Self

Returns the amethyst colour.

Return type:

Self

property b: int

Returns the blue component of the colour.

classmethod belize_hole() Self

Returns the belize hole colour.

Return type:

Self

classmethod blue_sentinel() Self

Returns the blue sentinel colour.

Return type:

Self

classmethod carrot() Self

Returns the carrot colour.

Return type:

Self

classmethod default() Self

Returns the default colour (#000000, Black).

Return type:

Self

classmethod dusty_sky() Self

Returns the dusty sky colour.

Return type:

Self

classmethod emerald() Self

Returns the emerald colour.

Return type:

Self

classmethod from_hex(hex_value) Self

Creates a Colour object from a hex string.

Parameters:

hex_value (str) – The hex string to convert

Return type:

Self

Returns:

The colour object

Raises:

ValueError – Invalid hex colour

classmethod from_rgb(r, g, b) Self

Creates a Colour object from RGB values.

Parameters:
  • r (int) – Red value

  • g (int) – Green value

  • b (int) – Blue value

Return type:

Self

Returns:

The colour object

property g: int

Returns the green component of the colour.

classmethod green_sea() Self

Returns the green sea colour.

Return type:

Self

classmethod harrison_grey() Self

Returns the harrison grey colour.

Return type:

Self

classmethod mellow_melon() Self

Returns the mellow melon colour.

Return type:

Self

classmethod nephritis() Self

Returns the nephritis colour.

Return type:

Self

classmethod orange() Self

Returns the orange colour.

Return type:

Self

classmethod peter_river() Self

Returns the peter river colour.

Return type:

Self

classmethod plum_perfect() Self

Returns the plum perfect colour.

Return type:

Self

classmethod pomegranate() Self

Returns the pomegranate colour.

Return type:

Self

classmethod pumpkin() Self

Returns the pumpkin colour.

Return type:

Self

property r: int

Returns the red component of the colour.

classmethod random(*, seed=None) Self

Creates a random colour.

Parameters:

seed (str | None) – The seed to use for the random colour to make it deterministic

Return type:

Self

Returns:

The random colour

classmethod sun_flower() Self

Returns the sun flower colour.

Return type:

Self

to_hex() str

Returns the hex value of the colour.

Return type:

str

to_rgb() tuple[int, int, int]

Returns the RGB values of the colour`.

Return type:

tuple[int, int, int]

classmethod turquoise() Self

Returns the turquoise colour.

Return type:

Self

classmethod whale_shark() Self

Returns the whale shark colour.

Return type:

Self

classmethod wisteria() Self

Returns the wisteria colour.

Return type:

Self