ppotatoo
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
discord/colour.py
|
@ -54,6 +54,10 @@ class Colour: |
|
|
|
|
|
|
|
|
Returns the hex format for the colour. |
|
|
Returns the hex format for the colour. |
|
|
|
|
|
|
|
|
|
|
|
.. describe:: int(x) |
|
|
|
|
|
|
|
|
|
|
|
Returns the raw color value. |
|
|
|
|
|
|
|
|
Attributes |
|
|
Attributes |
|
|
------------ |
|
|
------------ |
|
|
value: :class:`int` |
|
|
value: :class:`int` |
|
@ -80,6 +84,9 @@ class Colour: |
|
|
def __str__(self): |
|
|
def __str__(self): |
|
|
return f'#{self.value:0>6x}' |
|
|
return f'#{self.value:0>6x}' |
|
|
|
|
|
|
|
|
|
|
|
def __int__(self): |
|
|
|
|
|
return self.value |
|
|
|
|
|
|
|
|
def __repr__(self): |
|
|
def __repr__(self): |
|
|
return f'<Colour value={self.value}>' |
|
|
return f'<Colour value={self.value}>' |
|
|
|
|
|
|
|
|