diff --git a/.gitignore b/.gitignore index b556ebbb..9037e232 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ docs/crowdin.py *.jpg *.flac *.mo +dist +build \ No newline at end of file diff --git a/README.rst b/README.rst index bde42ed4..7f2affd1 100644 --- a/README.rst +++ b/README.rst @@ -1,17 +1,19 @@ -discord.py -========== +Enhanced-dpy (custom discord.py) +================================= -.. image:: https://discord.com/api/guilds/336642139381301249/embed.png - :target: https://discord.gg/r3sSKJJ - :alt: Discord server invite -.. image:: https://img.shields.io/pypi/v/discord.py.svg - :target: https://pypi.python.org/pypi/discord.py - :alt: PyPI version info .. image:: https://img.shields.io/pypi/pyversions/discord.py.svg :target: https://pypi.python.org/pypi/discord.py :alt: PyPI supported Python versions A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. +Credits to the `original lib by Rapptz `_ + +**WARNING: This is not the official discord.py library! As of 8/27/2021 Danny (Rapptz) has stopped development due to breaking changes. You are still able to read the official library at https://github.com/Rapptz/discord.py!** + +Custom Features +---------------- + +**Moved to:** `Custom Features `_ Key Features ------------- @@ -31,28 +33,17 @@ To install the library without full voice support, you can just run the followin .. code:: sh # Linux/macOS - python3 -m pip install -U discord.py + python3 -m pip install -U enhanced-dpy # Windows - py -3 -m pip install -U discord.py - -Otherwise to get voice support you should run the following command: - -.. code:: sh - - # Linux/macOS - python3 -m pip install -U "discord.py[voice]" - - # Windows - py -3 -m pip install -U discord.py[voice] - + py -3 -m pip install -U enhanced-dpy To install the development version, do the following: .. code:: sh - $ git clone https://github.com/Rapptz/discord.py - $ cd discord.py + $ git clone https://github.com/iDevision/enhanced-discord.py + $ cd enhanced-discord.py $ python3 -m pip install -U .[voice] @@ -109,6 +100,6 @@ You can find more examples in the examples directory. Links ------ -- `Documentation `_ -- `Official Discord Server `_ +- `Documentation `_ +- `Official Discord Server `_ - `Discord API `_ diff --git a/discord/__init__.py b/discord/__init__.py index dbbb54c9..8832aa7d 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -13,7 +13,7 @@ __title__ = 'discord' __author__ = 'Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-present Rapptz' -__version__ = '2.0.0a' +__version__ = '1.7.3.7.post1' __path__ = __import__('pkgutil').extend_path(__path__, __name__) @@ -57,8 +57,8 @@ from .team import * from .sticker import * from .interactions import * -VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial') +VersionInfo = namedtuple('VersionInfo', 'major minor micro enhanced releaselevel serial') -version_info = VersionInfo(major=2, minor=0, micro=0, releaselevel='alpha', serial=0) +version_info = VersionInfo(major=1, minor=7, micro=3, enhanced=7, releaselevel='final', serial=0) logging.getLogger(__name__).addHandler(logging.NullHandler()) diff --git a/discord/abc.py b/discord/abc.py index 18e8a062..62f55bd4 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -176,6 +176,7 @@ class GuildChannel(Protocol): - :class:`~discord.TextChannel` - :class:`~discord.VoiceChannel` - :class:`~discord.CategoryChannel` + - :class:`~discord.StageChannel` This ABC must also implement :class:`~discord.abc.Snowflake`. @@ -199,6 +200,9 @@ class GuildChannel(Protocol): def __str__(self): return self.name + def __int__(self): + return self.id + @property def _sorting_bucket(self): raise NotImplementedError @@ -734,10 +738,10 @@ class GuildChannel(Protocol): Whether to move the channel to the end of the channel list (or category if given). This is mutually exclusive with ``beginning``, ``before``, and ``after``. - before: :class:`abc.Snowflake` + before: :class:`~discord.abc.Snowflake` The channel that should be before our current channel. This is mutually exclusive with ``beginning``, ``end``, and ``after``. - after: :class:`abc.Snowflake` + after: :class:`~discord.abc.Snowflake` The channel that should be after our current channel. This is mutually exclusive with ``beginning``, ``end``, and ``before``. offset: :class:`int` @@ -747,7 +751,7 @@ class GuildChannel(Protocol): while a negative number moves it above. Note that this number is relative and computed after the ``beginning``, ``end``, ``before``, and ``after`` parameters. - category: Optional[:class:`abc.Snowflake`] + category: Optional[:class:`~discord.abc.Snowflake`] The category to move this channel under. If ``None`` is given then it moves it out of the category. This parameter is ignored if moving a category channel. @@ -974,6 +978,12 @@ class Messageable(Protocol): are used instead. .. versionadded:: 1.4 + message_reference: :class:`~discord.MessageReference` + A reference to the :class:`~discord.Message` to which you are replying, i.e. as created using + :meth:`~discord.MessageReference.from_message`. You can control whether this mentions the author + of the referenced Message using :attr:`~discord.AllowedMentions.replied_user`. + + .. versionadded:: 1.5.1.5 reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`] A reference to the :class:`~discord.Message` to which you are replying, this can be created using diff --git a/discord/appinfo.py b/discord/appinfo.py index 066cf6f0..44746fd0 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -62,30 +62,32 @@ class AppInfo: A list of RPC origin URLs, if RPC is enabled. summary: :class:`str` If this application is a game sold on Discord, - this field will be the summary field for the store page of its primary SKU + this field will be the summary field for the store page of its primary SKU. .. versionadded:: 1.3 verify_key: :class:`str` - The base64 encoded key for the GameSDK's GetTicket + The hex encoded key for verification in interactions and the + GameSDK's `GetTicket `_. .. versionadded:: 1.3 guild_id: Optional[:class:`int`] If this application is a game sold on Discord, - this field will be the guild to which it has been linked + this field will be the guild to which it has been linked to. .. versionadded:: 1.3 primary_sku_id: Optional[:class:`int`] If this application is a game sold on Discord, - this field will be the id of the "Game SKU" that is created, if exists + this field will be the id of the "Game SKU" that is created, + if it exists. .. versionadded:: 1.3 slug: Optional[:class:`str`] If this application is a game sold on Discord, - this field will be the URL slug that links to the store page + this field will be the URL slug that links to the store page. .. versionadded:: 1.3 diff --git a/discord/channel.py b/discord/channel.py index 5c6eed1e..5f3f4f44 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -27,7 +27,7 @@ import asyncio import discord.abc from .permissions import Permissions -from .enums import ChannelType, try_enum, VoiceRegion +from .enums import ChannelType, try_enum, VoiceRegion, PartyType from .mixins import Hashable from . import utils from .asset import Asset @@ -141,6 +141,13 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): def _sorting_bucket(self): return ChannelType.text.value + @property + def can_send(self): + """:class:`bool`: Checks if the bot can send messages + + .. versionadded:: 1.5.0.2""" + return self.permissions_for(self.guild.me).send_messages + @utils.copy_doc(discord.abc.GuildChannel.permissions_for) def permissions_for(self, member): base = super().permissions_for(member) @@ -727,6 +734,37 @@ class VoiceChannel(VocalGuildChannel): await self._edit(options, reason=reason) + async def create_party(self, application_id: PartyType, max_age: int = 86400 , max_uses: int = 0): + """|coro| + Creates a party in this voice channel. + + .. versionadded:: 1.7.3.8 + + Parameters + ---------- + application_id : PartyType + The id of the application the party belongs to. currently any of + ``PartyType.youtube``, ``PartyType.poker``, ``PartyType.betrayal``, ``PartyType.fishing``, ``PartyType.chess``. + max_age : int, optional + Duration in seconds after which the invite expires, by default 1 day. + max_uses : int, optional + maximum number of times this invite can be used, by default Unlimited. + + Raises + ------- + Forbidden + You do not have permissions to create a party. + HTTPException + Party creation failed. + + Returns + -------- + :class:`Party` + The created party. + """ + return Party(await self._state.http.create_party(self.id, application_id.value, max_age=max_age, max_uses=max_uses)) + + class StageChannel(VocalGuildChannel): """Represents a Discord guild stage channel. @@ -1255,6 +1293,7 @@ class DMChannel(discord.abc.Messageable, Hashable): """ base = Permissions.text() + base.read_messages = True base.send_tts_messages = False base.manage_messages = False return base @@ -1428,6 +1467,7 @@ class GroupChannel(discord.abc.Messageable, Hashable): """ base = Permissions.text() + base.read_messages = True base.send_tts_messages = False base.manage_messages = False base.mention_everyone = True @@ -1452,6 +1492,29 @@ class GroupChannel(discord.abc.Messageable, Hashable): await self._state.http.leave_group(self.id) +class Party: + """Represents a party in a voice channel.""" + + __slots__ = ('code', 'uses', 'max_uses', 'max_age', 'temporary', 'created_at') + def __init__(self, data): + self.code = data['code'] + self.uses = data['uses'] + self.max_uses = data['max_uses'] + self.max_age = data['max_age'] + self.temporary = data['temporary'] + self.created_at = utils.parse_time(data.get('created_at')) + # TODO: add more fields here Such as guild, raw data: https://mystb.in/AdvertisersExperiencesMothers.json + + def __repr__(self): + return f'' + + def __str__(self): + return f'https://discord.gg/{self.code}' + + def __eq__(self, other): + return isinstance(other, Party) and self.code == other.code + + def _channel_factory(channel_type): value = try_enum(ChannelType, channel_type) if value is ChannelType.text: diff --git a/discord/client.py b/discord/client.py index 32560099..a71bbff4 100644 --- a/discord/client.py +++ b/discord/client.py @@ -24,33 +24,35 @@ DEALINGS IN THE SOFTWARE. import asyncio import logging +import os +import re import signal import sys import traceback import aiohttp -from .user import User -from .invite import Invite -from .template import Template -from .widget import Widget -from .guild import Guild -from .channel import _channel_factory -from .enums import ChannelType -from .mentions import AllowedMentions -from .errors import * -from .enums import Status, VoiceRegion -from .gateway import * -from .activity import BaseActivity, create_activity -from .voice_client import VoiceClient -from .http import HTTPClient -from .state import ConnectionState from . import utils -from .object import Object -from .backoff import ExponentialBackoff -from .webhook import Webhook -from .iterators import GuildIterator +from .activity import BaseActivity, create_activity from .appinfo import AppInfo +from .backoff import ExponentialBackoff +from .channel import _channel_factory +from .colour import Color, Colour +from .enums import ChannelType, Status, VoiceRegion +from .errors import * +from .gateway import * +from .guild import Guild +from .http import HTTPClient +from .invite import Invite +from .iterators import GuildIterator +from .mentions import AllowedMentions +from .object import Object +from .state import ConnectionState +from .template import Template +from .user import User +from .voice_client import VoiceClient +from .webhook import Webhook +from .widget import Widget __all__ = ( 'Client', @@ -167,7 +169,7 @@ class Client: If this is set to ``False`` then the following features will be disabled: - - No user related updates (:func:`on_user_update` will not dispatch) + - No user related updates (:func:`on_user_update` will not dispatch)EmptyEmbed - All member related events will be disabled. - :func:`on_member_update` - :func:`on_member_join` @@ -197,6 +199,12 @@ class Client: sync your system clock to Google's NTP server. .. versionadded:: 1.3 + embed_color: Union[:class:`.Colour`, :class:`int`] + The default embed color you want to use when initialising a :class:`.Embed`. This will + remove the need to set the color per embed, but can still be overridden by setting a + color while creating an instance of an embed. + + .. versionadded:: 1.5.0.1 Attributes ----------- @@ -211,6 +219,19 @@ class Client: self._listeners = {} self.shard_id = options.get('shard_id') self.shard_count = options.get('shard_count') + colour = options.get('embed_color', Color.default()) + if isinstance(colour, (Color, Colour)): + os.environ['DEFAULT_EMBED_COLOR'] = str(hex(colour)) + else: + try: + HEX = re.compile(r'^(#)[A-Fa-f0-9]{6}$') + col = Color(colour) + if HEX.match(str(col)): + os.environ['DEFAULT_EMBED_COLOR'] = str(hex(col)) + else: + raise TypeError('The hex value passed could not be converted to a color') + except: + raise TypeError('embed_color must be an instance of discord.Colour or a valid 0x****** hex value.') connector = options.pop('connector', None) proxy = options.pop('proxy', None) @@ -239,6 +260,65 @@ class Client: # internals + def get_message(self, id): + """Get a message from cache if the message is still in cache. + + .. versionadded:: 1.6.0.7 + + Parameters + ----------- + id: :class:`int` + The message ID to look for. + + Returns + -------- + Optional[:class:`.Message`] + The message asked for.""" + return utils.get(self.cached_messages, id=id) + + @property + def embed_color(self): + """Optional[:class:`.Colour`]: The default embed colour that is + being used for all embed if no colour is passed.""" + col = os.getenv("DEFAULT_EMBED_COLOR") + if not col: + return None + return Colour(int(col, 16)) + + def set_embed_color(self, color): + """Set a new default embed color. + + This will raise a TypeError if an improper format was passed. + + .. versionadded:: 1.5.0.1 + + Parameters + ----------- + color: Union[:class:`.Colour`, :class:`int`] + The new color you want to set as default embed color. + Pass either an instance of discord.Color or a valid + 0x****** HEX value. + + Returns + -------- + :class:`.Colour` + The new color that has been set as default embed color. + """ + if isinstance(color, (Color, Colour)): + os.environ['DEFAULT_EMBED_COLOR'] = str(hex(color)) + return color + else: + try: + HEX = re.compile(r'^(#)[A-Fa-f0-9]{6}$') + col = Color(color) + if HEX.match(str(col)): + os.environ['DEFAULT_EMBED_COLOR'] = str(hex(col)) + return col + else: + raise TypeError('The hex value passed could not be converted to a color') + except: + raise TypeError('embed_color must be an instance of discord.Colour or a valid 0x****** hex value.') + def _get_websocket(self, guild_id=None, *, shard_id=None): return self.ws @@ -690,7 +770,7 @@ class Client: @property def intents(self): - """:class:`Intents`: The intents configured for this connection. + """:class:`~discord.Intents`: The intents configured for this connection. .. versionadded:: 1.5 """ @@ -1278,6 +1358,42 @@ class Client: data['rpc_origins'] = None return AppInfo(self._connection, data) + async def try_user(self, user_id): + """|coro| + + Retrieves a :class:`~discord.User` based on their ID. This can only + be used by bot accounts. + + .. versionadded:: 1.5.0.1 + + .. note:: + + This will first attempt to get the user from the cache. + If that fails, it will make an API call. + For general usage, consider :meth:`get_user` instead. + + Parameters + ----------- + user_id: :class:`int` + The user's ID to fetch from. + + Raises + ------- + :exc:`.NotFound` + A user with this ID does not exist. + :exc:`.HTTPException` + Fetching the user failed. + + Returns + -------- + :class:`~discord.User` + The user you requested. + """ + user = self.get_user(user_id) + if user is None: + user = await self.fetch_user(user_id) + return user + async def fetch_user(self, user_id): """|coro| @@ -1288,7 +1404,7 @@ class Client: .. note:: - This method is an API call. For general usage, consider :meth:`get_user` instead. + This method is an API call. If you have :attr:`Intents.members` and member cache enabled, consider :meth:`get_user` instead. Parameters ----------- diff --git a/discord/colour.py b/discord/colour.py index 95a70806..031dad6f 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -86,6 +86,12 @@ class Colour: def __hash__(self): return hash(self.value) + def __int__(self): + return int(str(self.value), 16) + + def __index__(self): + return self.value + @property def r(self): """:class:`int`: Returns the red component of the colour.""" @@ -269,4 +275,5292 @@ class Colour: """ return cls(0x36393F) -Color = Colour + @classmethod + def embed(cls): + """A factory method that returns a :class:'Colour' with a value of ``0x2F3136``. + Will appear transparent on Discord's dark theme using the embed color, making all corners appear rounded.""" + return cls(0x2F3136) + + @classmethod + def material_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xef534e``.""" + return cls(0xef534e) + + @classmethod + def material_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xec407e``.""" + return cls(0xec407e) + + @classmethod + def material_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xab47bc``.""" + return cls(0xab47bc) + + @classmethod + def material_deep_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7e56c1``.""" + return cls(0x7e56c1) + + @classmethod + def material_indigo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5c6bc0``.""" + return cls(0x5c6bc0) + + @classmethod + def material_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x42a5f5``.""" + return cls(0x42a5f5) + + @classmethod + def material_light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x29b6f6``.""" + return cls(0x29b6f6) + + @classmethod + def material_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x26c6da``.""" + return cls(0x26c6da) + + @classmethod + def material_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x26a69a``.""" + return cls(0x26a69a) + + @classmethod + def material_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x66bb6a``.""" + return cls(0x66bb6a) + + @classmethod + def material_light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9ccc65``.""" + return cls(0x9ccc65) + + @classmethod + def material_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd4e157``.""" + return cls(0xd4e157) + + @classmethod + def material_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffee58``.""" + return cls(0xffee58) + + @classmethod + def material_amber(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffca28``.""" + return cls(0xffca28) + + @classmethod + def material_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffa726``.""" + return cls(0xffa726) + + @classmethod + def material_deep_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff7043``.""" + return cls(0xff7043) + + @classmethod + def nitro_booster(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf47fff``. + + .. versionadded:: 1.5.1.5""" + return cls(0xf47fff) + + @classmethod + def rust(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa83c09``.""" + return cls(0xa83c09) + + @classmethod + def jade(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1fa774``.""" + return cls(0x1fa774) + + @classmethod + def ice(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd6fffa``.""" + return cls(0xd6fffa) + + @classmethod + def burgundy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x610023``.""" + return cls(0x610023) + + @classmethod + def pastel_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb0ff9d``.""" + return cls(0xb0ff9d) + + @classmethod + def caramel(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaf6f09``.""" + return cls(0xaf6f09) + + @classmethod + def mauve(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xae7181``.""" + return cls(0xae7181) + + @classmethod + def nice_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x107ab0``.""" + return cls(0x107ab0) + + @classmethod + def pinkish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc8aca9``.""" + return cls(0xc8aca9) + + @classmethod + def purply_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x661aee``.""" + return cls(0x661aee) + + @classmethod + def sand_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfce166``.""" + return cls(0xfce166) + + @classmethod + def purplish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7a687f``.""" + return cls(0x7a687f) + + @classmethod + def warm_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x978a84``.""" + return cls(0x978a84) + + @classmethod + def dark_blue_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x005249``.""" + return cls(0x005249) + + @classmethod + def slate(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x516572``.""" + return cls(0x516572) + + @classmethod + def mid_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x50a747``.""" + return cls(0x50a747) + + @classmethod + def light_grass_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9af764``.""" + return cls(0x9af764) + + @classmethod + def milk_chocolate(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f4e1e``.""" + return cls(0x7f4e1e) + + @classmethod + def neon_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe019a``.""" + return cls(0xfe019a) + + @classmethod + def blue_with_a_hint_of_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x533cc6``.""" + return cls(0x533cc6) + + @classmethod + def bright_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x87fd05``.""" + return cls(0x87fd05) + + @classmethod + def brownish_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc9b003``.""" + return cls(0xc9b003) + + @classmethod + def pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff81c0``.""" + return cls(0xff81c0) + + @classmethod + def stormy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x507b9c``.""" + return cls(0x507b9c) + + @classmethod + def piss_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xddd618``.""" + return cls(0xddd618) + + @classmethod + def gross_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa0bf16``.""" + return cls(0xa0bf16) + + @classmethod + def kiwi_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8ee53f``.""" + return cls(0x8ee53f) + + @classmethod + def pistachio(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc0fa8b``.""" + return cls(0xc0fa8b) + + @classmethod + def pastel_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff964f``.""" + return cls(0xff964f) + + @classmethod + def claret(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x680018``.""" + return cls(0x680018) + + @classmethod + def shamrock_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02c14d``.""" + return cls(0x02c14d) + + @classmethod + def azure(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x069af3``.""" + return cls(0x069af3) + + @classmethod + def bubble_gum_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff69af``.""" + return cls(0xff69af) + + @classmethod + def greeny_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x42b395``.""" + return cls(0x42b395) + + @classmethod + def rust_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc45508``.""" + return cls(0xc45508) + + @classmethod + def light_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbf77f6``.""" + return cls(0xbf77f6) + + @classmethod + def toxic_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x61de2a``.""" + return cls(0x61de2a) + + @classmethod + def mustard(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xceb301``.""" + return cls(0xceb301) + + @classmethod + def light_light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc8ffb0``.""" + return cls(0xc8ffb0) + + @classmethod + def cinnamon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac4f06``.""" + return cls(0xac4f06) + + @classmethod + def battleship_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6b7c85``.""" + return cls(0x6b7c85) + + @classmethod + def blood_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe4b03``.""" + return cls(0xfe4b03) + + @classmethod + def very_light_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd3b683``.""" + return cls(0xd3b683) + + @classmethod + def dark_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb416b``.""" + return cls(0xcb416b) + + @classmethod + def denim(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3b638c``.""" + return cls(0x3b638c) + + @classmethod + def brown_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x922b05``.""" + return cls(0x922b05) + + @classmethod + def dusty_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd58a94``.""" + return cls(0xd58a94) + + @classmethod + def apricot(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffb16d``.""" + return cls(0xffb16d) + + @classmethod + def red_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd3c06``.""" + return cls(0xfd3c06) + + @classmethod + def slate_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x59656d``.""" + return cls(0x59656d) + + @classmethod + def vibrant_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xad03de``.""" + return cls(0xad03de) + + @classmethod + def murky_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6c7a0e``.""" + return cls(0x6c7a0e) + + @classmethod + def booger_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x96b403``.""" + return cls(0x96b403) + + @classmethod + def purpleish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xdf4ec8``.""" + return cls(0xdf4ec8) + + @classmethod + def chocolate_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x411900``.""" + return cls(0x411900) + + @classmethod + def chestnut(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x742802``.""" + return cls(0x742802) + + @classmethod + def burnt_siena(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb75203``.""" + return cls(0xb75203) + + @classmethod + def rust_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8b3103``.""" + return cls(0x8b3103) + + @classmethod + def light_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xacfffc``.""" + return cls(0xacfffc) + + @classmethod + def greenish_beige(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc9d179``.""" + return cls(0xc9d179) + + @classmethod + def bright_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc760ff``.""" + return cls(0xc760ff) + + @classmethod + def aqua_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x12e193``.""" + return cls(0x12e193) + + @classmethod + def dark_indigo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1f0954``.""" + return cls(0x1f0954) + + @classmethod + def grey_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x826d8c``.""" + return cls(0x826d8c) + + @classmethod + def light_light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcafffb``.""" + return cls(0xcafffb) + + @classmethod + def dark_aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x05696b``.""" + return cls(0x05696b) + + @classmethod + def light_eggplant(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x894585``.""" + return cls(0x894585) + + @classmethod + def baby_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffb7ce``.""" + return cls(0xffb7ce) + + @classmethod + def true_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x089404``.""" + return cls(0x089404) + + @classmethod + def pea_soup_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x94a617``.""" + return cls(0x94a617) + + @classmethod + def vomit_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc7c10c``.""" + return cls(0xc7c10c) + + @classmethod + def dusty_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac86a8``.""" + return cls(0xac86a8) + + @classmethod + def light_khaki(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe6f2a2``.""" + return cls(0xe6f2a2) + + @classmethod + def light_mint_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa6fbb2``.""" + return cls(0xa6fbb2) + + @classmethod + def boring_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x63b365``.""" + return cls(0x63b365) + + @classmethod + def wintergreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x20f986``.""" + return cls(0x20f986) + + @classmethod + def wisteria(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa87dc2``.""" + return cls(0xa87dc2) + + @classmethod + def grey_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f7053``.""" + return cls(0x7f7053) + + @classmethod + def dark_lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9c6da5``.""" + return cls(0x9c6da5) + + @classmethod + def yellow_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc8fd3d``.""" + return cls(0xc8fd3d) + + @classmethod + def bluegreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x017a79``.""" + return cls(0x017a79) + + @classmethod + def deep_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02590f``.""" + return cls(0x02590f) + + @classmethod + def leafy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x51b73b``.""" + return cls(0x51b73b) + + @classmethod + def olive(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6e750e``.""" + return cls(0x6e750e) + + @classmethod + def watermelon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd4659``.""" + return cls(0xfd4659) + + @classmethod + def orangey_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdb915``.""" + return cls(0xfdb915) + + @classmethod + def mud_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x606602``.""" + return cls(0x606602) + + @classmethod + def flat_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x699d4c``.""" + return cls(0x699d4c) + + @classmethod + def greenish_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x32bf84``.""" + return cls(0x32bf84) + + @classmethod + def orange_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd411e``.""" + return cls(0xfd411e) + + @classmethod + def red_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfa2a55``.""" + return cls(0xfa2a55) + + @classmethod + def silver(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc5c9c7``.""" + return cls(0xc5c9c7) + + @classmethod + def seaweed_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x35ad6b``.""" + return cls(0x35ad6b) + + @classmethod + def barney(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac1db8``.""" + return cls(0xac1db8) + + @classmethod + def bright_sea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x05ffa6``.""" + return cls(0x05ffa6) + + @classmethod + def very_dark_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x062e03``.""" + return cls(0x062e03) + + @classmethod + def camo_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x526525``.""" + return cls(0x526525) + + @classmethod + def dusty_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x825f87``.""" + return cls(0x825f87) + + @classmethod + def dark_olive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3c4d03``.""" + return cls(0x3c4d03) + + @classmethod + def windows_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3778bf``.""" + return cls(0x3778bf) + + @classmethod + def dark_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaf884a``.""" + return cls(0xaf884a) + + @classmethod + def nasty_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x70b23f``.""" + return cls(0x70b23f) + + @classmethod + def dark_cream(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfff39a``.""" + return cls(0xfff39a) + + @classmethod + def yellowgreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbbf90f``.""" + return cls(0xbbf90f) + + @classmethod + def warm_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x952e8f``.""" + return cls(0x952e8f) + + @classmethod + def dirty_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x667e2c``.""" + return cls(0x667e2c) + + @classmethod + def camouflage_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4b6113``.""" + return cls(0x4b6113) + + @classmethod + def orangered(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe420f``.""" + return cls(0xfe420f) + + @classmethod + def brown_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x706c11``.""" + return cls(0x706c11) + + @classmethod + def very_dark_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1d0200``.""" + return cls(0x1d0200) + + @classmethod + def grey_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5e9b8a``.""" + return cls(0x5e9b8a) + + @classmethod + def apple_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76cd26``.""" + return cls(0x76cd26) + + @classmethod + def cadet_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4e7496``.""" + return cls(0x4e7496) + + @classmethod + def midnight(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x03012d``.""" + return cls(0x03012d) + + @classmethod + def bright_lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc95efb``.""" + return cls(0xc95efb) + + @classmethod + def bright_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01ff07``.""" + return cls(0x01ff07) + + @classmethod + def taupe(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb9a281``.""" + return cls(0xb9a281) + + @classmethod + def powder_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffb2d0``.""" + return cls(0xffb2d0) + + @classmethod + def light_pastel_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb2fba5``.""" + return cls(0xb2fba5) + + @classmethod + def puke_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9aae07``.""" + return cls(0x9aae07) + + @classmethod + def canary_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffe40``.""" + return cls(0xfffe40) + + @classmethod + def blood(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x770001``.""" + return cls(0x770001) + + @classmethod + def mocha(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9d7651``.""" + return cls(0x9d7651) + + @classmethod + def dark(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1b2431``.""" + return cls(0x1b2431) + + @classmethod + def dark_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0a888a``.""" + return cls(0x0a888a) + + @classmethod + def dark_sand(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa88f59``.""" + return cls(0xa88f59) + + @classmethod + def lightish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa552e6``.""" + return cls(0xa552e6) + + @classmethod + def sun_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffdf22``.""" + return cls(0xffdf22) + + @classmethod + def cherry_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf7022a``.""" + return cls(0xf7022a) + + @classmethod + def toupe(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc7ac7d``.""" + return cls(0xc7ac7d) + + @classmethod + def light_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfbeeac``.""" + return cls(0xfbeeac) + + @classmethod + def pale_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb1916e``.""" + return cls(0xb1916e) + + @classmethod + def dark_sage(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x598556``.""" + return cls(0x598556) + + @classmethod + def golden_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfec615``.""" + return cls(0xfec615) + + @classmethod + def racing_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x014600``.""" + return cls(0x014600) + + @classmethod + def vivid_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9900fa``.""" + return cls(0x9900fa) + + @classmethod + def fresh_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x69d84f``.""" + return cls(0x69d84f) + + @classmethod + def burnt_umber(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa0450e``.""" + return cls(0xa0450e) + + @classmethod + def deep_sea_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x015482``.""" + return cls(0x015482) + + @classmethod + def duck_egg_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc3fbf4``.""" + return cls(0xc3fbf4) + + @classmethod + def maize(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf4d054``.""" + return cls(0xf4d054) + + @classmethod + def sunny_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfff917``.""" + return cls(0xfff917) + + @classmethod + def khaki(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaaa662``.""" + return cls(0xaaa662) + + @classmethod + def dull_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5f9e8f``.""" + return cls(0x5f9e8f) + + @classmethod + def dark_coral(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcf524e``.""" + return cls(0xcf524e) + + @classmethod + def baby_poop_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8f9805``.""" + return cls(0x8f9805) + + @classmethod + def light_aquamarine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7bfdc7``.""" + return cls(0x7bfdc7) + + @classmethod + def lightish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3d7afd``.""" + return cls(0x3d7afd) + + @classmethod + def brownish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x86775f``.""" + return cls(0x86775f) + + @classmethod + def bluey_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x89a0b0``.""" + return cls(0x89a0b0) + + @classmethod + def cornflower(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6a79f7``.""" + return cls(0x6a79f7) + + @classmethod + def dirty_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc87606``.""" + return cls(0xc87606) + + @classmethod + def straw(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfcf679``.""" + return cls(0xfcf679) + + @classmethod + def sage_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x88b378``.""" + return cls(0x88b378) + + @classmethod + def acid_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8ffe09``.""" + return cls(0x8ffe09) + + @classmethod + def bluish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x748b97``.""" + return cls(0x748b97) + + @classmethod + def pale_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdc1c5``.""" + return cls(0xfdc1c5) + + @classmethod + def ultramarine_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1805db``.""" + return cls(0x1805db) + + @classmethod + def neon_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcfff04``.""" + return cls(0xcfff04) + + @classmethod + def light_neon_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4efd54``.""" + return cls(0x4efd54) + + @classmethod + def bottle_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x044a05``.""" + return cls(0x044a05) + + @classmethod + def twilight(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4e518b``.""" + return cls(0x4e518b) + + @classmethod + def poop_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7a5901``.""" + return cls(0x7a5901) + + @classmethod + def eggplant(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x380835``.""" + return cls(0x380835) + + @classmethod + def fuchsia(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xed0dd9``.""" + return cls(0xed0dd9) + + @classmethod + def cool_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x95a3a6``.""" + return cls(0x95a3a6) + + @classmethod + def sandstone(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc9ae74``.""" + return cls(0xc9ae74) + + @classmethod + def vomit(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa2a415``.""" + return cls(0xa2a415) + + @classmethod + def dark_aquamarine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x017371``.""" + return cls(0x017371) + + @classmethod + def pinky_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc94cbe``.""" + return cls(0xc94cbe) + + @classmethod + def washed_out_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbcf5a6``.""" + return cls(0xbcf5a6) + + @classmethod + def grey_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6b8ba4``.""" + return cls(0x6b8ba4) + + @classmethod + def dull_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd5869d``.""" + return cls(0xd5869d) + + @classmethod + def very_dark_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2a0134``.""" + return cls(0x2a0134) + + @classmethod + def tan_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xab7e4c``.""" + return cls(0xab7e4c) + + @classmethod + def sea(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3c9992``.""" + return cls(0x3c9992) + + @classmethod + def slate_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5b7c99``.""" + return cls(0x5b7c99) + + @classmethod + def mint(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9ffeb0``.""" + return cls(0x9ffeb0) + + @classmethod + def dull_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x49759c``.""" + return cls(0x49759c) + + @classmethod + def lightblue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7bc8f6``.""" + return cls(0x7bc8f6) + + @classmethod + def light_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7ef4cc``.""" + return cls(0x7ef4cc) + + @classmethod + def purply_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf075e6``.""" + return cls(0xf075e6) + + @classmethod + def dark_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x341c02``.""" + return cls(0x341c02) + + @classmethod + def drab(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x828344``.""" + return cls(0x828344) + + @classmethod + def orangish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb25f03``.""" + return cls(0xb25f03) + + @classmethod + def vivid_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2fef10``.""" + return cls(0x2fef10) + + @classmethod + def light_grey_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9dbcd4``.""" + return cls(0x9dbcd4) + + @classmethod + def mushroom(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xba9e88``.""" + return cls(0xba9e88) + + @classmethod + def royal_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4b006e``.""" + return cls(0x4b006e) + + @classmethod + def pale_mauve(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfed0fc``.""" + return cls(0xfed0fc) + + @classmethod + def dark_fuchsia(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9d0759``.""" + return cls(0x9d0759) + + @classmethod + def pastel_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xdb5856``.""" + return cls(0xdb5856) + + @classmethod + def golden_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb27a01``.""" + return cls(0xb27a01) + + @classmethod + def marigold(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfcc006``.""" + return cls(0xfcc006) + + @classmethod + def light_yellow_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xccfd7f``.""" + return cls(0xccfd7f) + + @classmethod + def greyish_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x719f91``.""" + return cls(0x719f91) + + @classmethod + def pale_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa5fbd5``.""" + return cls(0xa5fbd5) + + @classmethod + def cool_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x33b864``.""" + return cls(0x33b864) + + @classmethod + def dark_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x34013f``.""" + return cls(0x34013f) + + @classmethod + def orangey_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb16002``.""" + return cls(0xb16002) + + @classmethod + def pale_salmon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffb19a``.""" + return cls(0xffb19a) + + @classmethod + def butterscotch(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdb147``.""" + return cls(0xfdb147) + + @classmethod + def viridian(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1e9167``.""" + return cls(0x1e9167) + + @classmethod + def clay(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb66a50``.""" + return cls(0xb66a50) + + @classmethod + def light_gold(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfddc5c``.""" + return cls(0xfddc5c) + + @classmethod + def pale_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffa756``.""" + return cls(0xffa756) + + @classmethod + def violet_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfb5ffc``.""" + return cls(0xfb5ffc) + + @classmethod + def browny_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xca6b02``.""" + return cls(0xca6b02) + + @classmethod + def greyblue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x77a1b5``.""" + return cls(0x77a1b5) + + @classmethod + def greyish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7a6a4f``.""" + return cls(0x7a6a4f) + + @classmethod + def indigo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x380282``.""" + return cls(0x380282) + + @classmethod + def pale_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd9544d``.""" + return cls(0xd9544d) + + @classmethod + def barf_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x94ac02``.""" + return cls(0x94ac02) + + @classmethod + def dusk(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4e5481``.""" + return cls(0x4e5481) + + @classmethod + def dark_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd5b60a``.""" + return cls(0xd5b60a) + + @classmethod + def coffee(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa6814c``.""" + return cls(0xa6814c) + + @classmethod + def really_light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd4ffff``.""" + return cls(0xd4ffff) + + @classmethod + def light_burgundy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa8415b``.""" + return cls(0xa8415b) + + @classmethod + def leaf(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x71aa34``.""" + return cls(0x71aa34) + + @classmethod + def chartreuse(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc1f80a``.""" + return cls(0xc1f80a) + + @classmethod + def cream(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffc2``.""" + return cls(0xffffc2) + + @classmethod + def icky_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8fae22``.""" + return cls(0x8fae22) + + @classmethod + def sandy_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdee73``.""" + return cls(0xfdee73) + + @classmethod + def light_periwinkle(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc1c6fc``.""" + return cls(0xc1c6fc) + + @classmethod + def mango(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffa62b``.""" + return cls(0xffa62b) + + @classmethod + def sand(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe2ca76``.""" + return cls(0xe2ca76) + + @classmethod + def royal_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0504aa``.""" + return cls(0x0504aa) + + @classmethod + def emerald_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x028f1e``.""" + return cls(0x028f1e) + + @classmethod + def khaki_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x728639``.""" + return cls(0x728639) + + @classmethod + def orangeish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd8d49``.""" + return cls(0xfd8d49) + + @classmethod + def dusty_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5a86ad``.""" + return cls(0x5a86ad) + + @classmethod + def light_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd6b4fc``.""" + return cls(0xd6b4fc) + + @classmethod + def blood_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x980002``.""" + return cls(0x980002) + + @classmethod + def fluro_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0aff02``.""" + return cls(0x0aff02) + + @classmethod + def dirt(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8a6e45``.""" + return cls(0x8a6e45) + + @classmethod + def strong_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff0789``.""" + return cls(0xff0789) + + @classmethod + def hunter_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0b4008``.""" + return cls(0x0b4008) + + @classmethod + def charcoal_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3c4142``.""" + return cls(0x3c4142) + + @classmethod + def brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x653700``.""" + return cls(0x653700) + + @classmethod + def burnt_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc04e01``.""" + return cls(0xc04e01) + + @classmethod + def rusty_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcd5909``.""" + return cls(0xcd5909) + + @classmethod + def baby_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa2cffe``.""" + return cls(0xa2cffe) + + @classmethod + def tomato_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xec2d01``.""" + return cls(0xec2d01) + + @classmethod + def steel_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5a7d9a``.""" + return cls(0x5a7d9a) + + @classmethod + def celadon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbefdb7``.""" + return cls(0xbefdb7) + + @classmethod + def steel_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6f828a``.""" + return cls(0x6f828a) + + @classmethod + def aqua_marine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2ee8bb``.""" + return cls(0x2ee8bb) + + @classmethod + def medium_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2c6fbb``.""" + return cls(0x2c6fbb) + + @classmethod + def puke(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa5a502``.""" + return cls(0xa5a502) + + @classmethod + def sandy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf1da7a``.""" + return cls(0xf1da7a) + + @classmethod + def dark_slate_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x214761``.""" + return cls(0x214761) + + @classmethod + def dusty_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76a973``.""" + return cls(0x76a973) + + @classmethod + def deep_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9a0200``.""" + return cls(0x9a0200) + + @classmethod + def bile(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb5c306``.""" + return cls(0xb5c306) + + @classmethod + def purpley(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8756e4``.""" + return cls(0x8756e4) + + @classmethod + def light_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x90e4c1``.""" + return cls(0x90e4c1) + + @classmethod + def pale_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb7fffa``.""" + return cls(0xb7fffa) + + @classmethod + def peach(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffb07c``.""" + return cls(0xffb07c) + + @classmethod + def light_peach(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffd8b1``.""" + return cls(0xffd8b1) + + @classmethod + def rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcf6275``.""" + return cls(0xcf6275) + + @classmethod + def soft_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6fc276``.""" + return cls(0x6fc276) + + @classmethod + def warm_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x964e02``.""" + return cls(0x964e02) + + @classmethod + def pinkish_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd99b82``.""" + return cls(0xd99b82) + + @classmethod + def bubblegum_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe83cc``.""" + return cls(0xfe83cc) + + @classmethod + def buff(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfef69e``.""" + return cls(0xfef69e) + + @classmethod + def bright_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff000d``.""" + return cls(0xff000d) + + @classmethod + def plum(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x580f41``.""" + return cls(0x580f41) + + @classmethod + def medium_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9e43a2``.""" + return cls(0x9e43a2) + + @classmethod + def wheat(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfbdd7e``.""" + return cls(0xfbdd7e) + + @classmethod + def burnt_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9f2305``.""" + return cls(0x9f2305) + + @classmethod + def crimson(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8c000f``.""" + return cls(0x8c000f) + + @classmethod + def ugly_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcd7584``.""" + return cls(0xcd7584) + + @classmethod + def turquoise_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x06b1c4``.""" + return cls(0x06b1c4) + + @classmethod + def blush(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf29e8e``.""" + return cls(0xf29e8e) + + @classmethod + def orangey_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfa4224``.""" + return cls(0xfa4224) + + @classmethod + def key_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaeff6e``.""" + return cls(0xaeff6e) + + @classmethod + def lemon_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdff38``.""" + return cls(0xfdff38) + + @classmethod + def kelley_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x009337``.""" + return cls(0x009337) + + @classmethod + def dark_hot_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd90166``.""" + return cls(0xd90166) + + @classmethod + def baby_poop(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x937c00``.""" + return cls(0x937c00) + + @classmethod + def red_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9e0168``.""" + return cls(0x9e0168) + + @classmethod + def amethyst(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9b5fc0``.""" + return cls(0x9b5fc0) + + @classmethod + def bruise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7e4071``.""" + return cls(0x7e4071) + + @classmethod + def baby_puke_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb6c406``.""" + return cls(0xb6c406) + + @classmethod + def beige(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe6daa6``.""" + return cls(0xe6daa6) + + @classmethod + def ocre(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc69c04``.""" + return cls(0xc69c04) + + @classmethod + def muted_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3b719f``.""" + return cls(0x3b719f) + + @classmethod + def puke_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc2be0e``.""" + return cls(0xc2be0e) + + @classmethod + def burple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6832e3``.""" + return cls(0x6832e3) + + @classmethod + def lightish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x61e160``.""" + return cls(0x61e160) + + @classmethod + def greenish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x96ae8d``.""" + return cls(0x96ae8d) + + @classmethod + def butter(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffff81``.""" + return cls(0xffff81) + + @classmethod + def cerulean_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x056eee``.""" + return cls(0x056eee) + + @classmethod + def pinky(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfc86aa``.""" + return cls(0xfc86aa) + + @classmethod + def reddish_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x997570``.""" + return cls(0x997570) + + @classmethod + def light_mustard(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf7d560``.""" + return cls(0xf7d560) + + @classmethod + def faded_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x916e99``.""" + return cls(0x916e99) + + @classmethod + def wine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x80013f``.""" + return cls(0x80013f) + + @classmethod + def bordeaux(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7b002c``.""" + return cls(0x7b002c) + + @classmethod + def coral_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff6163``.""" + return cls(0xff6163) + + @classmethod + def cool_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4984b8``.""" + return cls(0x4984b8) + + @classmethod + def petrol(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x005f6a``.""" + return cls(0x005f6a) + + @classmethod + def hot_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb00f5``.""" + return cls(0xcb00f5) + + @classmethod + def violet_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x510ac9``.""" + return cls(0x510ac9) + + @classmethod + def iris(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6258c4``.""" + return cls(0x6258c4) + + @classmethod + def light_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff474c``.""" + return cls(0xff474c) + + @classmethod + def purpley_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x947e94``.""" + return cls(0x947e94) + + @classmethod + def fire_engine_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe0002``.""" + return cls(0xfe0002) + + @classmethod + def camel(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc69f59``.""" + return cls(0xc69f59) + + @classmethod + def vivid_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x152eff``.""" + return cls(0x152eff) + + @classmethod + def lightgreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76ff7b``.""" + return cls(0x76ff7b) + + @classmethod + def sky(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x82cafc``.""" + return cls(0x82cafc) + + @classmethod + def pig_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe78ea5``.""" + return cls(0xe78ea5) + + @classmethod + def ultramarine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2000b1``.""" + return cls(0x2000b1) + + @classmethod + def brick(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa03623``.""" + return cls(0xa03623) + + @classmethod + def electric_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaa23ff``.""" + return cls(0xaa23ff) + + @classmethod + def diarrhea(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9f8303``.""" + return cls(0x9f8303) + + @classmethod + def dark_maroon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3c0008``.""" + return cls(0x3c0008) + + @classmethod + def light_navy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2e5a88``.""" + return cls(0x2e5a88) + + @classmethod + def light_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfa5ff7``.""" + return cls(0xfa5ff7) + + @classmethod + def kelly_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02ab2e``.""" + return cls(0x02ab2e) + + @classmethod + def mustard_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac7e04``.""" + return cls(0xac7e04) + + @classmethod + def green_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x544e03``.""" + return cls(0x544e03) + + @classmethod + def pea_soup(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x929901``.""" + return cls(0x929901) + + @classmethod + def orange_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffad01``.""" + return cls(0xffad01) + + @classmethod + def dull_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x84597e``.""" + return cls(0x84597e) + + @classmethod + def macaroni_and_cheese(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xefb435``.""" + return cls(0xefb435) + + @classmethod + def pale_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xeecffe``.""" + return cls(0xeecffe) + + @classmethod + def light_seafoam_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa7ffb5``.""" + return cls(0xa7ffb5) + + @classmethod + def auburn(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9a3001``.""" + return cls(0x9a3001) + + @classmethod + def electric_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x21fc0d``.""" + return cls(0x21fc0d) + + @classmethod + def dark_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb5485d``.""" + return cls(0xb5485d) + + @classmethod + def grass_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3f9b0b``.""" + return cls(0x3f9b0b) + + @classmethod + def greenish_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x00fbb0``.""" + return cls(0x00fbb0) + + @classmethod + def brown_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb96902``.""" + return cls(0xb96902) + + @classmethod + def deep_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0d75f8``.""" + return cls(0x0d75f8) + + @classmethod + def shit_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7b5804``.""" + return cls(0x7b5804) + + @classmethod + def bluey_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6241c7``.""" + return cls(0x6241c7) + + @classmethod + def bright_aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0bf9ea``.""" + return cls(0x0bf9ea) + + @classmethod + def off_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6ba353``.""" + return cls(0x6ba353) + + @classmethod + def orange_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff6f52``.""" + return cls(0xff6f52) + + @classmethod + def deep_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x017374``.""" + return cls(0x017374) + + @classmethod + def sunflower(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffc512``.""" + return cls(0xffc512) + + @classmethod + def dark_forest_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x002d04``.""" + return cls(0x002d04) + + @classmethod + def dirty_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xca7b80``.""" + return cls(0xca7b80) + + @classmethod + def french_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x436bad``.""" + return cls(0x436bad) + + @classmethod + def wine_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7b0323``.""" + return cls(0x7b0323) + + @classmethod + def light_indigo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6d5acf``.""" + return cls(0x6d5acf) + + @classmethod + def bluish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2976bb``.""" + return cls(0x2976bb) + + @classmethod + def baby_shit_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x889717``.""" + return cls(0x889717) + + @classmethod + def squash(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf2ab15``.""" + return cls(0xf2ab15) + + @classmethod + def cobalt_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x030aa7``.""" + return cls(0x030aa7) + + @classmethod + def greyish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5e819d``.""" + return cls(0x5e819d) + + @classmethod + def lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaaff32``.""" + return cls(0xaaff32) + + @classmethod + def blue_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x137e6d``.""" + return cls(0x137e6d) + + @classmethod + def very_light_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf6cefc``.""" + return cls(0xf6cefc) + + @classmethod + def blue_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x607c8e``.""" + return cls(0x607c8e) + + @classmethod + def bright_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01f9c6``.""" + return cls(0x01f9c6) + + @classmethod + def tealish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x24bca8``.""" + return cls(0x24bca8) + + @classmethod + def very_pale_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcffdbc``.""" + return cls(0xcffdbc) + + @classmethod + def greeny_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc6f808``.""" + return cls(0xc6f808) + + @classmethod + def sand_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcba560``.""" + return cls(0xcba560) + + @classmethod + def pine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2b5d34``.""" + return cls(0x2b5d34) + + @classmethod + def dandelion(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfedf08``.""" + return cls(0xfedf08) + + @classmethod + def pale_olive(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb9cc81``.""" + return cls(0xb9cc81) + + @classmethod + def swamp_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x748500``.""" + return cls(0x748500) + + @classmethod + def brick_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8f1402``.""" + return cls(0x8f1402) + + @classmethod + def greenish_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcdfd02``.""" + return cls(0xcdfd02) + + @classmethod + def tree_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2a7e19``.""" + return cls(0x2a7e19) + + @classmethod + def poop(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f5e00``.""" + return cls(0x7f5e00) + + @classmethod + def blue_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2242c7``.""" + return cls(0x2242c7) + + @classmethod + def brown_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8d8468``.""" + return cls(0x8d8468) + + @classmethod + def neon_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbc13fe``.""" + return cls(0xbc13fe) + + @classmethod + def dark_olive(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x373e02``.""" + return cls(0x373e02) + + @classmethod + def bright_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe01b1``.""" + return cls(0xfe01b1) + + @classmethod + def light_moss_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa6c875``.""" + return cls(0xa6c875) + + @classmethod + def lemon_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbffe28``.""" + return cls(0xbffe28) + + @classmethod + def deep_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc74767``.""" + return cls(0xc74767) + + @classmethod + def dark_mauve(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x874c62``.""" + return cls(0x874c62) + + @classmethod + def purple_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x673a3f``.""" + return cls(0x673a3f) + + @classmethod + def dark_lime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7ebd01``.""" + return cls(0x7ebd01) + + @classmethod + def soft_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdb0c0``.""" + return cls(0xfdb0c0) + + @classmethod + def chocolate(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3d1c02``.""" + return cls(0x3d1c02) + + @classmethod + def grape_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5d1451``.""" + return cls(0x5d1451) + + @classmethod + def purple_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x990147``.""" + return cls(0x990147) + + @classmethod + def greenish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x40a368``.""" + return cls(0x40a368) + + @classmethod + def cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x00ffff``.""" + return cls(0x00ffff) + + @classmethod + def dark_pastel_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x56ae57``.""" + return cls(0x56ae57) + + @classmethod + def pale_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd767ad``.""" + return cls(0xd767ad) + + @classmethod + def shit_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x758000``.""" + return cls(0x758000) + + @classmethod + def faded_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf0944d``.""" + return cls(0xf0944d) + + @classmethod + def light_green_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x56fca2``.""" + return cls(0x56fca2) + + @classmethod + def pastel_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa2bffe``.""" + return cls(0xa2bffe) + + @classmethod + def terracotta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xca6641``.""" + return cls(0xca6641) + + @classmethod + def purpleish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6140ef``.""" + return cls(0x6140ef) + + @classmethod + def ice_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd7fffe``.""" + return cls(0xd7fffe) + + @classmethod + def dark_mint_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x20c073``.""" + return cls(0x20c073) + + @classmethod + def water_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0e87cc``.""" + return cls(0x0e87cc) + + @classmethod + def light_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffe7a``.""" + return cls(0xfffe7a) + + @classmethod + def pinkish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb17261``.""" + return cls(0xb17261) + + @classmethod + def off_white(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffe4``.""" + return cls(0xffffe4) + + @classmethod + def greyish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x82a67d``.""" + return cls(0x82a67d) + + @classmethod + def fluorescent_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x08ff08``.""" + return cls(0x08ff08) + + @classmethod + def deep_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xdc4d01``.""" + return cls(0xdc4d01) + + @classmethod + def medium_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7d7f7c``.""" + return cls(0x7d7f7c) + + @classmethod + def white(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffff``.""" + return cls(0xffffff) + + @classmethod + def lime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x89fe05``.""" + return cls(0x89fe05) + + @classmethod + def merlot(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x730039``.""" + return cls(0x730039) + + @classmethod + def desert(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xccad60``.""" + return cls(0xccad60) + + @classmethod + def lipstick_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc0022f``.""" + return cls(0xc0022f) + + @classmethod + def strawberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfb2943``.""" + return cls(0xfb2943) + + @classmethod + def pale_aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb8ffeb``.""" + return cls(0xb8ffeb) + + @classmethod + def sandy_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc4a661``.""" + return cls(0xc4a661) + + @classmethod + def lemon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdff52``.""" + return cls(0xfdff52) + + @classmethod + def minty_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0bf77d``.""" + return cls(0x0bf77d) + + @classmethod + def dark_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x84b701``.""" + return cls(0x84b701) + + @classmethod + def gunmetal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x536267``.""" + return cls(0x536267) + + @classmethod + def darkish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x014182``.""" + return cls(0x014182) + + @classmethod + def periwinkle(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8e82fe``.""" + return cls(0x8e82fe) + + @classmethod + def sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x75bbfd``.""" + return cls(0x75bbfd) + + @classmethod + def navy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01153e``.""" + return cls(0x01153e) + + @classmethod + def blue_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5729ce``.""" + return cls(0x5729ce) + + @classmethod + def pale_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffff84``.""" + return cls(0xffff84) + + @classmethod + def orangish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf43605``.""" + return cls(0xf43605) + + @classmethod + def dark_khaki(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9b8f55``.""" + return cls(0x9b8f55) + + @classmethod + def powder_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb1d1fc``.""" + return cls(0xb1d1fc) + + @classmethod + def blue_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5d06e9``.""" + return cls(0x5d06e9) + + @classmethod + def sickly_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd0e429``.""" + return cls(0xd0e429) + + @classmethod + def slime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x99cc04``.""" + return cls(0x99cc04) + + @classmethod + def sickly_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x94b21c``.""" + return cls(0x94b21c) + + @classmethod + def brownish_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb7723``.""" + return cls(0xcb7723) + + @classmethod + def aubergine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3d0734``.""" + return cls(0x3d0734) + + @classmethod + def forest(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0b5509``.""" + return cls(0x0b5509) + + @classmethod + def light_olive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa4be5c``.""" + return cls(0xa4be5c) + + @classmethod + def dirty_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3f829d``.""" + return cls(0x3f829d) + + @classmethod + def purplish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb0054b``.""" + return cls(0xb0054b) + + @classmethod + def parchment(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfefcaf``.""" + return cls(0xfefcaf) + + @classmethod + def cornflower_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5170d7``.""" + return cls(0x5170d7) + + @classmethod + def yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffff14``.""" + return cls(0xffff14) + + @classmethod + def dark_taupe(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f684e``.""" + return cls(0x7f684e) + + @classmethod + def deep_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x490648``.""" + return cls(0x490648) + + @classmethod + def dark_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x045c5a``.""" + return cls(0x045c5a) + + @classmethod + def dirt_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x836539``.""" + return cls(0x836539) + + @classmethod + def indigo_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3a18b1``.""" + return cls(0x3a18b1) + + @classmethod + def light_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffc5cb``.""" + return cls(0xffc5cb) + + @classmethod + def sea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x53fca1``.""" + return cls(0x53fca1) + + @classmethod + def muted_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5fa052``.""" + return cls(0x5fa052) + + @classmethod + def terra_cotta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc9643b``.""" + return cls(0xc9643b) + + @classmethod + def candy_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff63e9``.""" + return cls(0xff63e9) + + @classmethod + def ugly_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd0c101``.""" + return cls(0xd0c101) + + @classmethod + def darkish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x751973``.""" + return cls(0x751973) + + @classmethod + def stone(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xada587``.""" + return cls(0xada587) + + @classmethod + def pink_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf5054f``.""" + return cls(0xf5054f) + + @classmethod + def seaweed(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x18d17b``.""" + return cls(0x18d17b) + + @classmethod + def reddish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc44240``.""" + return cls(0xc44240) + + @classmethod + def earth(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa2653e``.""" + return cls(0xa2653e) + + @classmethod + def maroon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x650021``.""" + return cls(0x650021) + + @classmethod + def putty(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbeae8a``.""" + return cls(0xbeae8a) + + @classmethod + def muddy_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbfac05``.""" + return cls(0xbfac05) + + @classmethod + def very_light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd1ffbd``.""" + return cls(0xd1ffbd) + + @classmethod + def mustard_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd2bd0a``.""" + return cls(0xd2bd0a) + + @classmethod + def bright_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbe03fd``.""" + return cls(0xbe03fd) + + @classmethod + def purplish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x94568c``.""" + return cls(0x94568c) + + @classmethod + def kermit_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5cb200``.""" + return cls(0x5cb200) + + @classmethod + def raw_sienna(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9a6200``.""" + return cls(0x9a6200) + + @classmethod + def orchid(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc875c4``.""" + return cls(0xc875c4) + + @classmethod + def darkish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x287c37``.""" + return cls(0x287c37) + + @classmethod + def yellowish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfaee66``.""" + return cls(0xfaee66) + + @classmethod + def dark_yellow_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x728f02``.""" + return cls(0x728f02) + + @classmethod + def butter_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffd74``.""" + return cls(0xfffd74) + + @classmethod + def celery(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc1fd95``.""" + return cls(0xc1fd95) + + @classmethod + def tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd1b26f``.""" + return cls(0xd1b26f) + + @classmethod + def denim_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3b5b92``.""" + return cls(0x3b5b92) + + @classmethod + def pale_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffcfdc``.""" + return cls(0xffcfdc) + + @classmethod + def medium_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f5112``.""" + return cls(0x7f5112) + + @classmethod + def clay_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb2713d``.""" + return cls(0xb2713d) + + @classmethod + def leather(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac7434``.""" + return cls(0xac7434) + + @classmethod + def shit(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f5f00``.""" + return cls(0x7f5f00) + + @classmethod + def adobe(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbd6c48``.""" + return cls(0xbd6c48) + + @classmethod + def lavender_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8b88f8``.""" + return cls(0x8b88f8) + + @classmethod + def slate_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x658d6d``.""" + return cls(0x658d6d) + + @classmethod + def very_dark_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x000133``.""" + return cls(0x000133) + + @classmethod + def midnight_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x020035``.""" + return cls(0x020035) + + @classmethod + def light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x95d0fc``.""" + return cls(0x95d0fc) + + @classmethod + def canary(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdff63``.""" + return cls(0xfdff63) + + @classmethod + def greyish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa8a495``.""" + return cls(0xa8a495) + + @classmethod + def army_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4b5d16``.""" + return cls(0x4b5d16) + + @classmethod + def sap_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5c8b15``.""" + return cls(0x5c8b15) + + @classmethod + def ivory(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffcb``.""" + return cls(0xffffcb) + + @classmethod + def darkish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa90308``.""" + return cls(0xa90308) + + @classmethod + def robin_egg_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8af1fe``.""" + return cls(0x8af1fe) + + @classmethod + def light_bright_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x53fe5c``.""" + return cls(0x53fe5c) + + @classmethod + def deep_aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x08787f``.""" + return cls(0x08787f) + + @classmethod + def pumpkin_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfb7d07``.""" + return cls(0xfb7d07) + + @classmethod + def sage(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x87ae73``.""" + return cls(0x87ae73) + + @classmethod + def ochre(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbf9005``.""" + return cls(0xbf9005) + + @classmethod + def dark_grey_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x29465b``.""" + return cls(0x29465b) + + @classmethod + def grey_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc3909b``.""" + return cls(0xc3909b) + + @classmethod + def orange_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbe6400``.""" + return cls(0xbe6400) + + @classmethod + def teal_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x25a36f``.""" + return cls(0x25a36f) + + @classmethod + def greyish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x887191``.""" + return cls(0x887191) + + @classmethod + def creme(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffb6``.""" + return cls(0xffffb6) + + @classmethod + def bright_light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2dfe54``.""" + return cls(0x2dfe54) + + @classmethod + def muted_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd1768f``.""" + return cls(0xd1768f) + + @classmethod + def faded_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xde9dac``.""" + return cls(0xde9dac) + + @classmethod + def apple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6ecb3c``.""" + return cls(0x6ecb3c) + + @classmethod + def ocher(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbf9b0c``.""" + return cls(0xbf9b0c) + + @classmethod + def dusky_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcc7a8b``.""" + return cls(0xcc7a8b) + + @classmethod + def pale_peach(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffe5ad``.""" + return cls(0xffe5ad) + + @classmethod + def ocean_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3d9973``.""" + return cls(0x3d9973) + + @classmethod + def bright_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0165fc``.""" + return cls(0x0165fc) + + @classmethod + def bright_olive(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9cbb04``.""" + return cls(0x9cbb04) + + @classmethod + def bright_turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0ffef9``.""" + return cls(0x0ffef9) + + @classmethod + def almost_black(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x070d0d``.""" + return cls(0x070d0d) + + @classmethod + def lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc79fef``.""" + return cls(0xc79fef) + + @classmethod + def cobalt(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1e488f``.""" + return cls(0x1e488f) + + @classmethod + def pastel_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffbacd``.""" + return cls(0xffbacd) + + @classmethod + def ugly_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa442a0``.""" + return cls(0xa442a0) + + @classmethod + def poison_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x40fd14``.""" + return cls(0x40fd14) + + @classmethod + def dark_peach(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xde7e5d``.""" + return cls(0xde7e5d) + + @classmethod + def aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x13eac9``.""" + return cls(0x13eac9) + + @classmethod + def cement(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa5a391``.""" + return cls(0xa5a391) + + @classmethod + def eggshell_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc4fff7``.""" + return cls(0xc4fff7) + + @classmethod + def hot_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x25ff29``.""" + return cls(0x25ff29) + + @classmethod + def berry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x990f4b``.""" + return cls(0x990f4b) + + @classmethod + def indian_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x850e04``.""" + return cls(0x850e04) + + @classmethod + def deep_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x410200``.""" + return cls(0x410200) + + @classmethod + def heather(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa484ac``.""" + return cls(0xa484ac) + + @classmethod + def fawn(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcfaf7b``.""" + return cls(0xcfaf7b) + + @classmethod + def pear(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcbf85f``.""" + return cls(0xcbf85f) + + @classmethod + def pure_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0203e2``.""" + return cls(0x0203e2) + + @classmethod + def greeny_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7ea07a``.""" + return cls(0x7ea07a) + + @classmethod + def light_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdaa48``.""" + return cls(0xfdaa48) + + @classmethod + def light_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xdfc5fe``.""" + return cls(0xdfc5fe) + + @classmethod + def dried_blood(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4b0101``.""" + return cls(0x4b0101) + + @classmethod + def banana_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfafe4b``.""" + return cls(0xfafe4b) + + @classmethod + def carnation(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd798f``.""" + return cls(0xfd798f) + + @classmethod + def tiffany_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7bf2da``.""" + return cls(0x7bf2da) + + @classmethod + def light_sage(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbcecac``.""" + return cls(0xbcecac) + + @classmethod + def light_pea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc4fe82``.""" + return cls(0xc4fe82) + + @classmethod + def grey_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x789b73``.""" + return cls(0x789b73) + + @classmethod + def muddy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x657432``.""" + return cls(0x657432) + + @classmethod + def hazel(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8e7618``.""" + return cls(0x8e7618) + + @classmethod + def pink_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xef1de7``.""" + return cls(0xef1de7) + + @classmethod + def very_light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd5ffff``.""" + return cls(0xd5ffff) + + @classmethod + def lipstick(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd5174e``.""" + return cls(0xd5174e) + + @classmethod + def dark_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x448ee4``.""" + return cls(0x448ee4) + + @classmethod + def bright_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff5b00``.""" + return cls(0xff5b00) + + @classmethod + def carolina_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8ab8fe``.""" + return cls(0x8ab8fe) + + @classmethod + def mulberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x920a4e``.""" + return cls(0x920a4e) + + @classmethod + def twilight_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0a437a``.""" + return cls(0x0a437a) + + @classmethod + def kiwi(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9cef43``.""" + return cls(0x9cef43) + + @classmethod + def algae(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x54ac68``.""" + return cls(0x54ac68) + + @classmethod + def light_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffd1df``.""" + return cls(0xffd1df) + + @classmethod + def spearmint(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1ef876``.""" + return cls(0x1ef876) + + @classmethod + def pale_gold(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdde6c``.""" + return cls(0xfdde6c) + + @classmethod + def pale_light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb1fc99``.""" + return cls(0xb1fc99) + + @classmethod + def bluish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x10a674``.""" + return cls(0x10a674) + + @classmethod + def periwinkle_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8f99fb``.""" + return cls(0x8f99fb) + + @classmethod + def green_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb5ce08``.""" + return cls(0xb5ce08) + + @classmethod + def sienna(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa9561e``.""" + return cls(0xa9561e) + + @classmethod + def carmine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9d0216``.""" + return cls(0x9d0216) + + @classmethod + def snot_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9dc100``.""" + return cls(0x9dc100) + + @classmethod + def aqua_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02d8e9``.""" + return cls(0x02d8e9) + + @classmethod + def purple_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd725de``.""" + return cls(0xd725de) + + @classmethod + def muted_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x805b87``.""" + return cls(0x805b87) + + @classmethod + def deep_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x040273``.""" + return cls(0x040273) + + @classmethod + def irish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x019529``.""" + return cls(0x019529) + + @classmethod + def deep_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x00555a``.""" + return cls(0x00555a) + + @classmethod + def pale_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd0fefe``.""" + return cls(0xd0fefe) + + @classmethod + def deep_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa0025c``.""" + return cls(0xa0025c) + + @classmethod + def darkblue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x030764``.""" + return cls(0x030764) + + @classmethod + def seafoam(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x80f9ad``.""" + return cls(0x80f9ad) + + @classmethod + def muddy_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x886806``.""" + return cls(0x886806) + + @classmethod + def ocean_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x03719c``.""" + return cls(0x03719c) + + @classmethod + def bluey_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2bb179``.""" + return cls(0x2bb179) + + @classmethod + def dark_sea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x11875d``.""" + return cls(0x11875d) + + @classmethod + def fern_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x548d44``.""" + return cls(0x548d44) + + @classmethod + def green_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x77926f``.""" + return cls(0x77926f) + + @classmethod + def lime_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd0fe1d``.""" + return cls(0xd0fe1d) + + @classmethod + def electric_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa8ff04``.""" + return cls(0xa8ff04) + + @classmethod + def pea(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa4bf20``.""" + return cls(0xa4bf20) + + @classmethod + def bluish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x703be7``.""" + return cls(0x703be7) + + @classmethod + def poo_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x885f01``.""" + return cls(0x885f01) + + @classmethod + def old_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc77986``.""" + return cls(0xc77986) + + @classmethod + def fern(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x63a950``.""" + return cls(0x63a950) + + @classmethod + def eggplant_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x430541``.""" + return cls(0x430541) + + @classmethod + def drab_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x749551``.""" + return cls(0x749551) + + @classmethod + def baby_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8cff9e``.""" + return cls(0x8cff9e) + + @classmethod + def moss_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x658b38``.""" + return cls(0x658b38) + + @classmethod + def spruce(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0a5f38``.""" + return cls(0x0a5f38) + + @classmethod + def light_yellowish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc2ff89``.""" + return cls(0xc2ff89) + + @classmethod + def light_beige(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffeb6``.""" + return cls(0xfffeb6) + + @classmethod + def neon_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x04d9ff``.""" + return cls(0x04d9ff) + + @classmethod + def dusty_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf0833a``.""" + return cls(0xf0833a) + + @classmethod + def light_royal_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3a2efe``.""" + return cls(0x3a2efe) + + @classmethod + def reddish_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf8481c``.""" + return cls(0xf8481c) + + @classmethod + def british_racing_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x05480d``.""" + return cls(0x05480d) + + @classmethod + def sea_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x047495``.""" + return cls(0x047495) + + @classmethod + def true_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x010fcc``.""" + return cls(0x010fcc) + + @classmethod + def brownish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9c6d57``.""" + return cls(0x9c6d57) + + @classmethod + def yellow_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfcb001``.""" + return cls(0xfcb001) + + @classmethod + def light_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x96f97b``.""" + return cls(0x96f97b) + + @classmethod + def dark_seafoam_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3eaf76``.""" + return cls(0x3eaf76) + + @classmethod + def light_maroon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa24857``.""" + return cls(0xa24857) + + @classmethod + def pinkish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd648d7``.""" + return cls(0xd648d7) + + @classmethod + def bland(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xafa88b``.""" + return cls(0xafa88b) + + @classmethod + def brownish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6a6e09``.""" + return cls(0x6a6e09) + + @classmethod + def greenish_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2afeb7``.""" + return cls(0x2afeb7) + + @classmethod + def pale_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x82cbb2``.""" + return cls(0x82cbb2) + + @classmethod + def light_bluish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76fda8``.""" + return cls(0x76fda8) + + @classmethod + def mint_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8fff9f``.""" + return cls(0x8fff9f) + + @classmethod + def amber(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfeb308``.""" + return cls(0xfeb308) + + @classmethod + def rusty_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaf2f0d``.""" + return cls(0xaf2f0d) + + @classmethod + def rich_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x720058``.""" + return cls(0x720058) + + @classmethod + def sunshine_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffd37``.""" + return cls(0xfffd37) + + @classmethod + def rich_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x021bf9``.""" + return cls(0x021bf9) + + @classmethod + def terracota(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb6843``.""" + return cls(0xcb6843) + + @classmethod + def light_mint(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb6ffbb``.""" + return cls(0xb6ffbb) + + @classmethod + def green_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01c08d``.""" + return cls(0x01c08d) + + @classmethod + def dark_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x856798``.""" + return cls(0x856798) + + @classmethod + def cherry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcf0234``.""" + return cls(0xcf0234) + + @classmethod + def saffron(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfeb209``.""" + return cls(0xfeb209) + + @classmethod + def greenish_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbccb7a``.""" + return cls(0xbccb7a) + + @classmethod + def dark_beige(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xac9362``.""" + return cls(0xac9362) + + @classmethod + def mid_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x276ab3``.""" + return cls(0x276ab3) + + @classmethod + def rosa(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe86a4``.""" + return cls(0xfe86a4) + + @classmethod + def red_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x820747``.""" + return cls(0x820747) + + @classmethod + def dusk_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x26538d``.""" + return cls(0x26538d) + + @classmethod + def orangish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfc824a``.""" + return cls(0xfc824a) + + @classmethod + def moss(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x769958``.""" + return cls(0x769958) + + @classmethod + def dark_navy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x000435``.""" + return cls(0x000435) + + @classmethod + def lemon_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xadf802``.""" + return cls(0xadf802) + + @classmethod + def spring_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa9f971``.""" + return cls(0xa9f971) + + @classmethod + def jade_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2baf6a``.""" + return cls(0x2baf6a) + + @classmethod + def purpleish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x98568d``.""" + return cls(0x98568d) + + @classmethod + def hot_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff028d``.""" + return cls(0xff028d) + + @classmethod + def electric_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff0490``.""" + return cls(0xff0490) + + @classmethod + def shocking_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe02a2``.""" + return cls(0xfe02a2) + + @classmethod + def goldenrod(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfac205``.""" + return cls(0xfac205) + + @classmethod + def puce(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa57e52``.""" + return cls(0xa57e52) + + @classmethod + def dark_salmon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc85a53``.""" + return cls(0xc85a53) + + @classmethod + def pale_lime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb1ff65``.""" + return cls(0xb1ff65) + + @classmethod + def pale_lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe4cbff``.""" + return cls(0xe4cbff) + + @classmethod + def faded_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x658cbb``.""" + return cls(0x658cbb) + + @classmethod + def light_navy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x155084``.""" + return cls(0x155084) + + @classmethod + def burnt_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd5ab09``.""" + return cls(0xd5ab09) + + @classmethod + def dodger_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3e82fc``.""" + return cls(0x3e82fc) + + @classmethod + def jungle_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x048243``.""" + return cls(0x048243) + + @classmethod + def red_wine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8c0034``.""" + return cls(0x8c0034) + + @classmethod + def primary_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0804f9``.""" + return cls(0x0804f9) + + @classmethod + def grass(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5cac2d``.""" + return cls(0x5cac2d) + + @classmethod + def ocean(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x017b92``.""" + return cls(0x017b92) + + @classmethod + def cranberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9e003a``.""" + return cls(0x9e003a) + + @classmethod + def dark_blue_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1f3b4d``.""" + return cls(0x1f3b4d) + + @classmethod + def very_pale_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd6fffe``.""" + return cls(0xd6fffe) + + @classmethod + def medium_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x39ad48``.""" + return cls(0x39ad48) + + @classmethod + def bright_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02ccfe``.""" + return cls(0x02ccfe) + + @classmethod + def grapefruit(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfd5956``.""" + return cls(0xfd5956) + + @classmethod + def camo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f8f4e``.""" + return cls(0x7f8f4e) + + @classmethod + def turquoise_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x04f489``.""" + return cls(0x04f489) + + @classmethod + def dark_green_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1f6357``.""" + return cls(0x1f6357) + + @classmethod + def royal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0c1793``.""" + return cls(0x0c1793) + + @classmethod + def tomato(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xef4026``.""" + return cls(0xef4026) + + @classmethod + def avocado_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x87a922``.""" + return cls(0x87a922) + + @classmethod + def seafoam_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7af9ab``.""" + return cls(0x7af9ab) + + @classmethod + def dark_plum(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3f012c``.""" + return cls(0x3f012c) + + @classmethod + def ruby(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xca0147``.""" + return cls(0xca0147) + + @classmethod + def brick_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc14a09``.""" + return cls(0xc14a09) + + @classmethod + def greenblue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x23c48b``.""" + return cls(0x23c48b) + + @classmethod + def purplish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6b4247``.""" + return cls(0x6b4247) + + @classmethod + def mahogany(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4a0100``.""" + return cls(0x4a0100) + + @classmethod + def medium_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf36196``.""" + return cls(0xf36196) + + @classmethod + def greenish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0b8b87``.""" + return cls(0x0b8b87) + + @classmethod + def robins_egg_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x98eff9``.""" + return cls(0x98eff9) + + @classmethod + def greenish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x696112``.""" + return cls(0x696112) + + @classmethod + def purplish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x601ef9``.""" + return cls(0x601ef9) + + @classmethod + def baby_shit_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xad900d``.""" + return cls(0xad900d) + + @classmethod + def ugly_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x31668a``.""" + return cls(0x31668a) + + @classmethod + def yellowish_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffab0f``.""" + return cls(0xffab0f) + + @classmethod + def avocado(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x90b134``.""" + return cls(0x90b134) + + @classmethod + def frog_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x58bc08``.""" + return cls(0x58bc08) + + @classmethod + def yellowy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbff128``.""" + return cls(0xbff128) + + @classmethod + def navy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x001146``.""" + return cls(0x001146) + + @classmethod + def light_aqua(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8cffdb``.""" + return cls(0x8cffdb) + + @classmethod + def pale_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc7fdb5``.""" + return cls(0xc7fdb5) + + @classmethod + def pale_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xceaefa``.""" + return cls(0xceaefa) + + @classmethod + def faded_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd3494e``.""" + return cls(0xd3494e) + + @classmethod + def reddish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe2c54``.""" + return cls(0xfe2c54) + + @classmethod + def light_seafoam(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa0febf``.""" + return cls(0xa0febf) + + @classmethod + def forrest_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x154406``.""" + return cls(0x154406) + + @classmethod + def very_light_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfff4f2``.""" + return cls(0xfff4f2) + + @classmethod + def prussian_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x004577``.""" + return cls(0x004577) + + @classmethod + def heliotrope(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd94ff5``.""" + return cls(0xd94ff5) + + @classmethod + def pale(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfff9d0``.""" + return cls(0xfff9d0) + + @classmethod + def algae_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x21c36f``.""" + return cls(0x21c36f) + + @classmethod + def olive_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x645403``.""" + return cls(0x645403) + + @classmethod + def barbie_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe46a5``.""" + return cls(0xfe46a5) + + @classmethod + def vomit_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x89a203``.""" + return cls(0x89a203) + + @classmethod + def soft_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6488ea``.""" + return cls(0x6488ea) + + @classmethod + def vibrant_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0339f8``.""" + return cls(0x0339f8) + + @classmethod + def brownish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9e3623``.""" + return cls(0x9e3623) + + @classmethod + def evergreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x05472a``.""" + return cls(0x05472a) + + @classmethod + def bright_cyan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x41fdfe``.""" + return cls(0x41fdfe) + + @classmethod + def night_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x040348``.""" + return cls(0x040348) + + @classmethod + def deep_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb0162``.""" + return cls(0xcb0162) + + @classmethod + def tealish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0cdc73``.""" + return cls(0x0cdc73) + + @classmethod + def light_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc6fcff``.""" + return cls(0xc6fcff) + + @classmethod + def neon_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0cff0c``.""" + return cls(0x0cff0c) + + @classmethod + def weird_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3ae57f``.""" + return cls(0x3ae57f) + + @classmethod + def dirty_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x734a65``.""" + return cls(0x734a65) + + @classmethod + def light_lime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb9ff66``.""" + return cls(0xb9ff66) + + @classmethod + def dark_seafoam(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1fb57a``.""" + return cls(0x1fb57a) + + @classmethod + def reddish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x910951``.""" + return cls(0x910951) + + @classmethod + def bright_yellow_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9dff00``.""" + return cls(0x9dff00) + + @classmethod + def rouge(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xab1239``.""" + return cls(0xab1239) + + @classmethod + def raw_umber(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa75e09``.""" + return cls(0xa75e09) + + @classmethod + def plum_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4e0550``.""" + return cls(0x4e0550) + + @classmethod + def green_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0cb577``.""" + return cls(0x0cb577) + + @classmethod + def booger(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9bb53c``.""" + return cls(0x9bb53c) + + @classmethod + def pumpkin(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xe17701``.""" + return cls(0xe17701) + + @classmethod + def purpley_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5f34e7``.""" + return cls(0x5f34e7) + + @classmethod + def dull_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd8863b``.""" + return cls(0xd8863b) + + @classmethod + def dull_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbb3f3f``.""" + return cls(0xbb3f3f) + + @classmethod + def pinkish(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xd46a7e``.""" + return cls(0xd46a7e) + + @classmethod + def purpley_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc83cb9``.""" + return cls(0xc83cb9) + + @classmethod + def light_blue_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb7c9e2``.""" + return cls(0xb7c9e2) + + @classmethod + def deep_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x36013f``.""" + return cls(0x36013f) + + @classmethod + def faded_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfeff7f``.""" + return cls(0xfeff7f) + + @classmethod + def forest_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x06470c``.""" + return cls(0x06470c) + + @classmethod + def lighter_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x75fd63``.""" + return cls(0x75fd63) + + @classmethod + def dark_periwinkle(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x665fd1``.""" + return cls(0x665fd1) + + @classmethod + def dull_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x74a662``.""" + return cls(0x74a662) + + @classmethod + def black(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x000000``.""" + return cls(0x000000) + + @classmethod + def deep_lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x966ebd``.""" + return cls(0x966ebd) + + @classmethod + def old_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc87f89``.""" + return cls(0xc87f89) + + @classmethod + def light_forest_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4f9153``.""" + return cls(0x4f9153) + + @classmethod + def seafoam_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x78d1b6``.""" + return cls(0x78d1b6) + + @classmethod + def bright_lime_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x65fe08``.""" + return cls(0x65fe08) + + @classmethod + def manilla(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffa86``.""" + return cls(0xfffa86) + + @classmethod + def light_greenish_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x63f7b4``.""" + return cls(0x63f7b4) + + @classmethod + def perrywinkle(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8f8ce7``.""" + return cls(0x8f8ce7) + + @classmethod + def bright_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff08e8``.""" + return cls(0xff08e8) + + @classmethod + def marine_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01386a``.""" + return cls(0x01386a) + + @classmethod + def mossy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x638b27``.""" + return cls(0x638b27) + + @classmethod + def turtle_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x75b84f``.""" + return cls(0x75b84f) + + @classmethod + def yellowish_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfcfc81``.""" + return cls(0xfcfc81) + + @classmethod + def coral(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfc5a50``.""" + return cls(0xfc5a50) + + @classmethod + def asparagus(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x77ab56``.""" + return cls(0x77ab56) + + @classmethod + def light_mauve(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc292a1``.""" + return cls(0xc292a1) + + @classmethod + def light_olive(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xacbf69``.""" + return cls(0xacbf69) + + @classmethod + def golden(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf5bf03``.""" + return cls(0xf5bf03) + + @classmethod + def flat_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3c73a8``.""" + return cls(0x3c73a8) + + @classmethod + def darkish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xda467d``.""" + return cls(0xda467d) + + @classmethod + def sepia(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x985e2b``.""" + return cls(0x985e2b) + + @classmethod + def ecru(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfeffca``.""" + return cls(0xfeffca) + + @classmethod + def greeny_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x696006``.""" + return cls(0x696006) + + @classmethod + def foam_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x90fda9``.""" + return cls(0x90fda9) + + @classmethod + def military_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x667c3e``.""" + return cls(0x667c3e) + + @classmethod + def rose_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf7879a``.""" + return cls(0xf7879a) + + @classmethod + def bubblegum(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff6cb5``.""" + return cls(0xff6cb5) + + @classmethod + def azul(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1d5dec``.""" + return cls(0x1d5dec) + + @classmethod + def leaf_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5ca904``.""" + return cls(0x5ca904) + + @classmethod + def scarlet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbe0119``.""" + return cls(0xbe0119) + + @classmethod + def yellowish_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb0dd16``.""" + return cls(0xb0dd16) + + @classmethod + def bright_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffd01``.""" + return cls(0xfffd01) + + @classmethod + def grape(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6c3461``.""" + return cls(0x6c3461) + + @classmethod + def banana(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffff7e``.""" + return cls(0xffff7e) + + @classmethod + def barney_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa00498``.""" + return cls(0xa00498) + + @classmethod + def light_blue_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7efbb3``.""" + return cls(0x7efbb3) + + @classmethod + def strong_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0c06f7``.""" + return cls(0x0c06f7) + + @classmethod + def light_urple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb36ff6``.""" + return cls(0xb36ff6) + + @classmethod + def bright_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xad0afd``.""" + return cls(0xad0afd) + + @classmethod + def purple_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x632de9``.""" + return cls(0x632de9) + + @classmethod + def highlighter_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1bfc06``.""" + return cls(0x1bfc06) + + @classmethod + def salmon_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe7b7c``.""" + return cls(0xfe7b7c) + + @classmethod + def light_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xad8150``.""" + return cls(0xad8150) + + @classmethod + def bluegrey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x85a3b2``.""" + return cls(0x85a3b2) + + @classmethod + def darkgreen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x054907``.""" + return cls(0x054907) + + @classmethod + def lichen(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8fb67b``.""" + return cls(0x8fb67b) + + @classmethod + def egg_shell(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffcc4``.""" + return cls(0xfffcc4) + + @classmethod + def browny_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6f6c0a``.""" + return cls(0x6f6c0a) + + @classmethod + def brownish_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76424e``.""" + return cls(0x76424e) + + @classmethod + def pinkish_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff724c``.""" + return cls(0xff724c) + + @classmethod + def pale_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb790d4``.""" + return cls(0xb790d4) + + @classmethod + def clear_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x247afd``.""" + return cls(0x247afd) + + @classmethod + def raspberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb00149``.""" + return cls(0xb00149) + + @classmethod + def dusky_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xba6873``.""" + return cls(0xba6873) + + @classmethod + def ugly_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7a9703``.""" + return cls(0x7a9703) + + @classmethod + def cloudy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xacc2d9``.""" + return cls(0xacc2d9) + + @classmethod + def bright_light_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x26f7fd``.""" + return cls(0x26f7fd) + + @classmethod + def dark_mint(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x48c072``.""" + return cls(0x48c072) + + @classmethod + def pinky_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfc2647``.""" + return cls(0xfc2647) + + @classmethod + def dusty_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc0737a``.""" + return cls(0xc0737a) + + @classmethod + def lightish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe2f4a``.""" + return cls(0xfe2f4a) + + @classmethod + def pastel_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcaa0ff``.""" + return cls(0xcaa0ff) + + @classmethod + def yellowy_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xae8b0c``.""" + return cls(0xae8b0c) + + @classmethod + def rust_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaa2704``.""" + return cls(0xaa2704) + + @classmethod + def light_salmon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfea993``.""" + return cls(0xfea993) + + @classmethod + def olive_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc2b709``.""" + return cls(0xc2b709) + + @classmethod + def pale_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbefd73``.""" + return cls(0xbefd73) + + @classmethod + def radioactive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2cfa1f``.""" + return cls(0x2cfa1f) + + @classmethod + def light_lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xedc8ff``.""" + return cls(0xedc8ff) + + @classmethod + def teal_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01889f``.""" + return cls(0x01889f) + + @classmethod + def tea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbdf8a3``.""" + return cls(0xbdf8a3) + + @classmethod + def bronze(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa87900``.""" + return cls(0xa87900) + + @classmethod + def reddy_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6e1005``.""" + return cls(0x6e1005) + + @classmethod + def dark_grass_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x388004``.""" + return cls(0x388004) + + @classmethod + def peachy_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff9a8a``.""" + return cls(0xff9a8a) + + @classmethod + def dirty_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcdc50a``.""" + return cls(0xcdc50a) + + @classmethod + def tangerine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff9408``.""" + return cls(0xff9408) + + @classmethod + def deep_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8d5eb7``.""" + return cls(0x8d5eb7) + + @classmethod + def umber(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb26400``.""" + return cls(0xb26400) + + @classmethod + def olive_drab(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6f7632``.""" + return cls(0x6f7632) + + @classmethod + def baby_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xca9bf7``.""" + return cls(0xca9bf7) + + @classmethod + def cerise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xde0c62``.""" + return cls(0xde0c62) + + @classmethod + def melon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff7855``.""" + return cls(0xff7855) + + @classmethod + def burnt_sienna(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb04e0f``.""" + return cls(0xb04e0f) + + @classmethod + def vibrant_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0add08``.""" + return cls(0x0add08) + + @classmethod + def yellowish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9b7a01``.""" + return cls(0x9b7a01) + + @classmethod + def shamrock(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01b44c``.""" + return cls(0x01b44c) + + @classmethod + def brown_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb29705``.""" + return cls(0xb29705) + + @classmethod + def tan_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa9be70``.""" + return cls(0xa9be70) + + @classmethod + def purplish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xce5dae``.""" + return cls(0xce5dae) + + @classmethod + def grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x929591``.""" + return cls(0x929591) + + @classmethod + def mud_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x60460f``.""" + return cls(0x60460f) + + @classmethod + def pea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8eab12``.""" + return cls(0x8eab12) + + @classmethod + def reddish_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7f2b0a``.""" + return cls(0x7f2b0a) + + @classmethod + def blush_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfe828c``.""" + return cls(0xfe828c) + + @classmethod + def light_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xaefd6c``.""" + return cls(0xaefd6c) + + @classmethod + def hot_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf504c9``.""" + return cls(0xf504c9) + + @classmethod + def poop_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6f7c00``.""" + return cls(0x6f7c00) + + @classmethod + def swamp(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x698339``.""" + return cls(0x698339) + + @classmethod + def faded_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7bb274``.""" + return cls(0x7bb274) + + @classmethod + def yellow_ochre(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcb9d06``.""" + return cls(0xcb9d06) + + @classmethod + def dust(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb2996e``.""" + return cls(0xb2996e) + + @classmethod + def soft_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa66fb5``.""" + return cls(0xa66fb5) + + @classmethod + def light_lavendar(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xefc0fe``.""" + return cls(0xefc0fe) + + @classmethod + def dark_royal_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x02066f``.""" + return cls(0x02066f) + + @classmethod + def violet_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa50055``.""" + return cls(0xa50055) + + @classmethod + def rosy_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf6688e``.""" + return cls(0xf6688e) + + @classmethod + def lighter_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa55af4``.""" + return cls(0xa55af4) + + @classmethod + def eggshell(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffffd4``.""" + return cls(0xffffd4) + + @classmethod + def greyish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc88d94``.""" + return cls(0xc88d94) + + @classmethod + def russet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa13905``.""" + return cls(0xa13905) + + @classmethod + def purply(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x983fb2``.""" + return cls(0x983fb2) + + @classmethod + def red_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8b2e16``.""" + return cls(0x8b2e16) + + @classmethod + def off_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf1f33f``.""" + return cls(0xf1f33f) + + @classmethod + def warm_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4b57db``.""" + return cls(0x4b57db) + + @classmethod + def metallic_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4f738e``.""" + return cls(0x4f738e) + + @classmethod + def golden_rod(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf9bc08``.""" + return cls(0xf9bc08) + + @classmethod + def pale_olive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb1d27b``.""" + return cls(0xb1d27b) + + @classmethod + def dusty_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb9484e``.""" + return cls(0xb9484e) + + @classmethod + def light_plum(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9d5783``.""" + return cls(0x9d5783) + + @classmethod + def lilac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xcea2fd``.""" + return cls(0xcea2fd) + + @classmethod + def dusky_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x895b7b``.""" + return cls(0x895b7b) + + @classmethod + def green_apple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5edc1f``.""" + return cls(0x5edc1f) + + @classmethod + def hospital_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9be5aa``.""" + return cls(0x9be5aa) + + @classmethod + def lavender_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xdd85d7``.""" + return cls(0xdd85d7) + + @classmethod + def light_grey_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb7e1a1``.""" + return cls(0xb7e1a1) + + @classmethod + def topaz(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x13bbaf``.""" + return cls(0x13bbaf) + + @classmethod + def dull_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x876e4b``.""" + return cls(0x876e4b) + + @classmethod + def steel(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x738595``.""" + return cls(0x738595) + + @classmethod + def rose_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbe013c``.""" + return cls(0xbe013c) + + @classmethod + def aquamarine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x04d8b2``.""" + return cls(0x04d8b2) + + @classmethod + def midnight_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x280137``.""" + return cls(0x280137) + + @classmethod + def grassy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x419c03``.""" + return cls(0x419c03) + + @classmethod + def charcoal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x343837``.""" + return cls(0x343837) + + @classmethod + def puke_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x947706``.""" + return cls(0x947706) + + @classmethod + def pinkish_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf10c45``.""" + return cls(0xf10c45) + + @classmethod + def cocoa(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x875f42``.""" + return cls(0x875f42) + + @classmethod + def baby_poo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xab9004``.""" + return cls(0xab9004) + + @classmethod + def salmon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff796c``.""" + return cls(0xff796c) + + @classmethod + def ugly_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7d7103``.""" + return cls(0x7d7103) + + @classmethod + def purple_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x866f85``.""" + return cls(0x866f85) + + @classmethod + def olive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x677a04``.""" + return cls(0x677a04) + + @classmethod + def dull_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xeedc5b``.""" + return cls(0xeedc5b) + + @classmethod + def blueberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x464196``.""" + return cls(0x464196) + + @classmethod + def neon_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff073a``.""" + return cls(0xff073a) + + @classmethod + def peacock_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x016795``.""" + return cls(0x016795) + + @classmethod + def snot(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xacbb0d``.""" + return cls(0xacbb0d) + + @classmethod + def tea(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x65ab7c``.""" + return cls(0x65ab7c) + + @classmethod + def liliac(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc48efd``.""" + return cls(0xc48efd) + + @classmethod + def easter_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc071fe``.""" + return cls(0xc071fe) + + @classmethod + def pale_grey(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfdfdfe``.""" + return cls(0xfdfdfe) + + @classmethod + def electric_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0652ff``.""" + return cls(0x0652ff) + + @classmethod + def dark_mustard(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa88905``.""" + return cls(0xa88905) + + @classmethod + def pastel_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffe71``.""" + return cls(0xfffe71) + + @classmethod + def off_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5684ae``.""" + return cls(0x5684ae) + + @classmethod + def marine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x042e60``.""" + return cls(0x042e60) + + @classmethod + def dark_navy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x00022e``.""" + return cls(0x00022e) + + @classmethod + def pale_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xbdf6fe``.""" + return cls(0xbdf6fe) + + @classmethod + def violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9a0eea``.""" + return cls(0x9a0eea) + + @classmethod + def mustard_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xa8b504``.""" + return cls(0xa8b504) + + @classmethod + def light_sea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x98f6b0``.""" + return cls(0x98f6b0) + + @classmethod + def yellow_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb79400``.""" + return cls(0xb79400) + + @classmethod + def pine_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0a481e``.""" + return cls(0x0a481e) + + @classmethod + def velvet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x750851``.""" + return cls(0x750851) + + @classmethod + def navy_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x35530a``.""" + return cls(0x35530a) + + @classmethod + def custard(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfffd78``.""" + return cls(0xfffd78) + + @classmethod + def yellow_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffe36e``.""" + return cls(0xffe36e) + + @classmethod + def poo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8f7303``.""" + return cls(0x8f7303) + + @classmethod + def mud(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x735c12``.""" + return cls(0x735c12) + + @classmethod + def vermillion(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xf4320c``.""" + return cls(0xf4320c) + + @classmethod + def copper(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xb66325``.""" + return cls(0xb66325) + + @classmethod + def easter_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8cfd7e``.""" + return cls(0x8cfd7e) + + @classmethod + def sunflower_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xffda03``.""" + return cls(0xffda03) + + @classmethod + def brownish_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xc27e79``.""" + return cls(0xc27e79) + + @classmethod + def emerald(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x01a049``.""" + return cls(0x01a049) + + @classmethod + def carnation_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xff7fa7``.""" + return cls(0xff7fa7) + + @classmethod + def dusky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x475f94``.""" + return cls(0x475f94) + + @classmethod + def turquoise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x06c2ac``.""" + return cls(0x06c2ac) + + @classmethod + def robins_egg(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6dedfd``.""" + return cls(0x6dedfd) + + @classmethod + def sapphire(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2138ab``.""" + return cls(0x2138ab) + + @classmethod + def dusty_teal(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4c9085``.""" + return cls(0x4c9085) + + @classmethod + def lawn_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x4da409``.""" + return cls(0x4da409) + + @classmethod + def cerulean(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0485d1``.""" + return cls(0x0485d1) + + @classmethod + def sick_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9db92c``.""" + return cls(0x9db92c) + + @classmethod + def warm_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xfb5581``.""" + return cls(0xfb5581) + + @classmethod + def crayon_black(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x000000``.""" + return cls(0x000000) + + @classmethod + def crayon_purple_mountains__majesty(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9D81BA``.""" + return cls(0x9D81BA) + + @classmethod + def crayon_electric_lime(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCEFF1D``.""" + return cls(0xCEFF1D) + + @classmethod + def crayon_chestnut(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xBC5D58``.""" + return cls(0xBC5D58) + + @classmethod + def crayon_tumbleweed(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xDEAA88``.""" + return cls(0xDEAA88) + + @classmethod + def crayon_wild_strawberry(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF43A4``.""" + return cls(0xFF43A4) + + @classmethod + def crayon_shocking_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFB7EFD``.""" + return cls(0xFB7EFD) + + @classmethod + def crayon_sunglow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFCF48``.""" + return cls(0xFFCF48) + + @classmethod + def crayon_razzle_dazzle_rose(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF48D0``.""" + return cls(0xFF48D0) + + @classmethod + def crayon_wisteria(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCDA4DE``.""" + return cls(0xCDA4DE) + + @classmethod + def crayon_razzmatazz(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xE3256B``.""" + return cls(0xE3256B) + + @classmethod + def crayon_wild_blue_yonder(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xA2ADD0``.""" + return cls(0xA2ADD0) + + @classmethod + def crayon_laser_lemon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFEFE22``.""" + return cls(0xFEFE22) + + @classmethod + def crayon_blush(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xDE5D83``.""" + return cls(0xDE5D83) + + @classmethod + def crayon_blue_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x0D98BA``.""" + return cls(0x0D98BA) + + @classmethod + def crayon_blue_bell(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xA2A2D0``.""" + return cls(0xA2A2D0) + + @classmethod + def crayon_fuzzy_wuzzy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCC6666``.""" + return cls(0xCC6666) + + @classmethod + def crayon_fuchsia(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xC364C5``.""" + return cls(0xC364C5) + + @classmethod + def crayon_gray(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x95918C``.""" + return cls(0x95918C) + + @classmethod + def crayon_denim(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x2B6CC4``.""" + return cls(0x2B6CC4) + + @classmethod + def crayon_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xEE204D``.""" + return cls(0xEE204D) + + @classmethod + def crayon_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFCE883``.""" + return cls(0xFCE883) + + @classmethod + def crayon_peach(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFCFAB``.""" + return cls(0xFFCFAB) + + @classmethod + def crayon_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1F75FE``.""" + return cls(0x1F75FE) + + @classmethod + def crayon_green_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xF0E891``.""" + return cls(0xF0E891) + + @classmethod + def crayon_screamin__green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x76FF7A``.""" + return cls(0x76FF7A) + + @classmethod + def crayon_canary(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFFF99``.""" + return cls(0xFFFF99) + + @classmethod + def crayon_caribbean_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x00CC99``.""" + return cls(0x00CC99) + + @classmethod + def crayon_sepia(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xA5694F``.""" + return cls(0xA5694F) + + @classmethod + def crayon_almond(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xEFDECD``.""" + return cls(0xEFDECD) + + @classmethod + def crayon_burnt_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF7F49``.""" + return cls(0xFF7F49) + + @classmethod + def crayon_mango_tango(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF8243``.""" + return cls(0xFF8243) + + @classmethod + def crayon_pine_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x158078``.""" + return cls(0x158078) + + @classmethod + def crayon_silver(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCDC5C2``.""" + return cls(0xCDC5C2) + + @classmethod + def crayon_fern(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x71BC78``.""" + return cls(0x71BC78) + + @classmethod + def crayon_lavender(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFCB4D5``.""" + return cls(0xFCB4D5) + + @classmethod + def crayon_orchid(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xE6A8D7``.""" + return cls(0xE6A8D7) + + @classmethod + def crayon_sky_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x80DAEB``.""" + return cls(0x80DAEB) + + @classmethod + def crayon_granny_smith_apple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xA8E4A0``.""" + return cls(0xA8E4A0) + + @classmethod + def crayon_scarlet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFC2847``.""" + return cls(0xFC2847) + + @classmethod + def crayon_brown(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xB4674D``.""" + return cls(0xB4674D) + + @classmethod + def crayon_red_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF5349``.""" + return cls(0xFF5349) + + @classmethod + def crayon_vivid_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8F509D``.""" + return cls(0x8F509D) + + @classmethod + def crayon_yellow_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xC5E384``.""" + return cls(0xC5E384) + + @classmethod + def crayon_cadet_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xB0B7C6``.""" + return cls(0xB0B7C6) + + @classmethod + def crayon_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF7538``.""" + return cls(0xFF7538) + + @classmethod + def crayon_neon_carrot(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFA343``.""" + return cls(0xFFA343) + + @classmethod + def crayon_yellow_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFAE42``.""" + return cls(0xFFAE42) + + @classmethod + def crayon_red_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xC0448F``.""" + return cls(0xC0448F) + + @classmethod + def crayon_carnation_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFAACC``.""" + return cls(0xFFAACC) + + @classmethod + def crayon_turquoise_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x77DDE7``.""" + return cls(0x77DDE7) + + @classmethod + def crayon_banana_mania(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFAE7B5``.""" + return cls(0xFAE7B5) + + @classmethod + def crayon_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xF664AF``.""" + return cls(0xF664AF) + + @classmethod + def crayon_robin_s_egg_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1FCECB``.""" + return cls(0x1FCECB) + + @classmethod + def crayon_eggplant(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6E5160``.""" + return cls(0x6E5160) + + @classmethod + def crayon_white(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFFFFF``.""" + return cls(0xFFFFFF) + + @classmethod + def crayon_purple_pizzazz(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFE4EDA``.""" + return cls(0xFE4EDA) + + @classmethod + def crayon_shamrock(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x45CEA2``.""" + return cls(0x45CEA2) + + @classmethod + def crayon_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1CAC78``.""" + return cls(0x1CAC78) + + @classmethod + def crayon_mountain_meadow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x30BA8F``.""" + return cls(0x30BA8F) + + @classmethod + def crayon_sunset_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFD5E53``.""" + return cls(0xFD5E53) + + @classmethod + def crayon_tickle_me_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFC89AC``.""" + return cls(0xFC89AC) + + @classmethod + def crayon_manatee(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x979AAA``.""" + return cls(0x979AAA) + + @classmethod + def crayon_desert_sand(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xEFCDB8``.""" + return cls(0xEFCDB8) + + @classmethod + def crayon_indigo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x5D76CB``.""" + return cls(0x5D76CB) + + @classmethod + def crayon_brick_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCB4154``.""" + return cls(0xCB4154) + + @classmethod + def crayon_asparagus(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x87A96B``.""" + return cls(0x87A96B) + + @classmethod + def crayon_blue_violet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7366BD``.""" + return cls(0x7366BD) + + @classmethod + def crayon_gold(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xE7C697``.""" + return cls(0xE7C697) + + @classmethod + def crayon_dandelion(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFDDB6D``.""" + return cls(0xFDDB6D) + + @classmethod + def crayon_cotton_candy(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFBCD9``.""" + return cls(0xFFBCD9) + + @classmethod + def crayon_bittersweet(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFD7C6E``.""" + return cls(0xFD7C6E) + + @classmethod + def crayon_aquamarine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x78DBE2``.""" + return cls(0x78DBE2) + + @classmethod + def crayon_purple_heart(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7442C8``.""" + return cls(0x7442C8) + + @classmethod + def crayon_copper(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xDD9475``.""" + return cls(0xDD9475) + + @classmethod + def crayon_pacific_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1CA9C9``.""" + return cls(0x1CA9C9) + + @classmethod + def crayon_outrageous_orange(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF6E4A``.""" + return cls(0xFF6E4A) + + @classmethod + def crayon_midnight_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1A4876``.""" + return cls(0x1A4876) + + @classmethod + def crayon_cerulean(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1DACD6``.""" + return cls(0x1DACD6) + + @classmethod + def crayon_sea_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x93DFB8``.""" + return cls(0x93DFB8) + + @classmethod + def crayon_beaver(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9F8170``.""" + return cls(0x9F8170) + + @classmethod + def crayon_wild_watermelon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFC6C85``.""" + return cls(0xFC6C85) + + @classmethod + def crayon_cornflower(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x9ACEEB``.""" + return cls(0x9ACEEB) + + @classmethod + def crayon_royal_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x7851A9``.""" + return cls(0x7851A9) + + @classmethod + def crayon_salmon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF9BAA``.""" + return cls(0xFF9BAA) + + @classmethod + def crayon_unmellow_yellow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFFF66``.""" + return cls(0xFFFF66) + + @classmethod + def crayon_plum(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8E4585``.""" + return cls(0x8E4585) + + @classmethod + def crayon_mahogany(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCD4A4C``.""" + return cls(0xCD4A4C) + + @classmethod + def crayon_raw_sienna(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xD68A59``.""" + return cls(0xD68A59) + + @classmethod + def crayon_spring_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xECEABE``.""" + return cls(0xECEABE) + + @classmethod + def crayon_cerise(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xDD4492``.""" + return cls(0xDD4492) + + @classmethod + def crayon_tan(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFAA76C``.""" + return cls(0xFAA76C) + + @classmethod + def crayon_jazzberry_jam(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCA3767``.""" + return cls(0xCA3767) + + @classmethod + def crayon_periwinkle(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xC5D0E6``.""" + return cls(0xC5D0E6) + + @classmethod + def crayon_pink_sherbert(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xF78FA7``.""" + return cls(0xF78FA7) + + @classmethod + def crayon_melon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFDBCB4``.""" + return cls(0xFDBCB4) + + @classmethod + def crayon_jungle_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x3BB08F``.""" + return cls(0x3BB08F) + + @classmethod + def crayon_hot_magenta(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF1DCE``.""" + return cls(0xFF1DCE) + + @classmethod + def crayon_apricot(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFDD9B5``.""" + return cls(0xFDD9B5) + + @classmethod + def crayon_navy_blue(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x1974D2``.""" + return cls(0x1974D2) + + @classmethod + def crayon_goldenrod(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFCD975``.""" + return cls(0xFCD975) + + @classmethod + def crayon_tropical_rain_forest(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x17806D``.""" + return cls(0x17806D) + + @classmethod + def crayon_violet_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xF75394``.""" + return cls(0xF75394) + + @classmethod + def crayon_vivid_tangerine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFA089``.""" + return cls(0xFFA089) + + @classmethod + def crayon_olive_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xBAB86C``.""" + return cls(0xBAB86C) + + @classmethod + def crayon_inchworm(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xB2EC5D``.""" + return cls(0xB2EC5D) + + @classmethod + def crayon_forest_green(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x6DAE81``.""" + return cls(0x6DAE81) + + @classmethod + def crayon_macaroni_and_cheese(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFBD88``.""" + return cls(0xFFBD88) + + @classmethod + def crayon_atomic_tangerine(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFFA474``.""" + return cls(0xFFA474) + + @classmethod + def crayon_maroon(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xC8385A``.""" + return cls(0xC8385A) + + @classmethod + def crayon_antique_brass(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xCD9575``.""" + return cls(0xCD9575) + + @classmethod + def crayon_timberwolf(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xDBD7D2``.""" + return cls(0xDBD7D2) + + @classmethod + def crayon_outer_space(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x414A4C``.""" + return cls(0x414A4C) + + @classmethod + def crayon_violet_purple(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x926EAE``.""" + return cls(0x926EAE) + + @classmethod + def crayon_shadow(cls): + """A factory method that returns a :class:`Colour` with a value of ``0x8A795D``.""" + return cls(0x8A795D) + + @classmethod + def crayon_radical_red(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFF496C``.""" + return cls(0xFF496C) + + @classmethod + def crayon_burnt_sienna(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xEA7E5D``.""" + return cls(0xEA7E5D) + + @classmethod + def crayon_mauvelous(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xEF98AA``.""" + return cls(0xEF98AA) + + @classmethod + def crayon_pink_flamingo(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFC74FD``.""" + return cls(0xFC74FD) + + @classmethod + def crayon_piggy_pink(cls): + """A factory method that returns a :class:`Colour` with a value of ``0xFDDDE6``.""" + return cls(0xFDDDE6) + +Color = Colour \ No newline at end of file diff --git a/discord/embeds.py b/discord/embeds.py index 34efa37b..32331f5d 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations import datetime +import os from typing import Any, Dict, Final, List, Protocol, TYPE_CHECKING, Type, TypeVar, Union from . import utils @@ -186,7 +187,13 @@ class Embed: timestamp: datetime.datetime = None, ): - self.colour = colour if colour is not EmptyEmbed else color + if colour is EmptyEmbed and color is EmptyEmbed: + colour = os.getenv("DEFAULT_EMBED_COLOR", default=EmptyEmbed) + if isinstance(colour, str): + colour = int(colour, 16) + else: + colour = colour if colour is not EmptyEmbed else color + self.colour = colour self.title = title self.type = type self.url = url diff --git a/discord/emoji.py b/discord/emoji.py index 02c0ddc8..af7a2b98 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -114,6 +114,9 @@ class Emoji(_EmojiTag): return ''.format(self) return "<:{0.name}:{0.id}>".format(self) + def __int__(self): + return self.id + def __repr__(self): return ''.format(self) diff --git a/discord/enums.py b/discord/enums.py index ac83c13f..261a4361 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -30,6 +30,7 @@ __all__ = ( 'Enum', 'ChannelType', 'MessageType', + 'PartyType', 'VoiceRegion', 'SpeakingState', 'VerificationLevel', @@ -179,6 +180,13 @@ class MessageType(Enum): guild_discovery_grace_period_initial_warning = 16 guild_discovery_grace_period_final_warning = 17 +class PartyType(Enum): + youtube = 755600276941176913 + poker = 755827207812677713 + betrayal = 773336526917861400 + fishing = 814288819477020702 + chess = 832012774040141894 + class VoiceRegion(Enum): us_west = 'us-west' us_east = 'us-east' @@ -368,6 +376,8 @@ class AuditLogAction(Enum): return 'webhook' elif v < 70: return 'emoji' + elif v == 73: + return 'channel' elif v < 80: return 'message' elif v < 90: diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index e421f8d9..2fc4bbda 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -24,20 +24,21 @@ DEALINGS IN THE SOFTWARE. import asyncio import collections -import inspect import importlib.util +import inspect +import itertools import sys import traceback import types import discord -from .core import GroupMixin -from .view import StringView -from .context import Context from . import errors -from .help import HelpCommand, DefaultHelpCommand from .cog import Cog +from .context import Context +from .core import GroupMixin +from .help import DefaultHelpCommand, HelpCommand +from .view import StringView __all__ = ( 'when_mentioned', @@ -99,9 +100,10 @@ class _DefaultRepr: _default = _DefaultRepr() class BotBase(GroupMixin): - def __init__(self, command_prefix, help_command=_default, description=None, **options): + def __init__(self, command_prefix, case_insensitive_prefix=False, help_command=_default, description=None, **options): super().__init__(**options) self.command_prefix = command_prefix + self.case_insensitive_prefix = case_insensitive_prefix self.extra_events = {} self.__cogs = {} self.__extensions = {} @@ -131,6 +133,29 @@ class BotBase(GroupMixin): else: self.help_command = help_command + @property + def owner(self): + """:class:`discord.User`: The owner, retrieved from owner_id. In case of improper caching, this can return None + + .. versionadded:: 1.5.0.1""" + if not self.owner_id or self.owner_ids: + raise AttributeError('No owner_id specified or you used owner_ids. If you used owner_ids, please refer to `Bot.owners`') + return self.get_user(self.owner_id) + + @property + def owners(self): + """List[:class:`discord.User`]: The owners, retrieved from owner_ids. In case of improper caching, this list may not contain all owners. + + .. versionadded:: 1.5.0.1""" + if not self.owner_ids or self.owner_id: + raise TypeError('No owner_ids specified or you used owner_id. If you used owner_id, please refer to `Bot.owner`') + owners = [] + for user in self.owner_ids: + owner = self.get_user(user) + if owner: + owners.append(owner) + return owners + # internal helpers def dispatch(self, event_name, *args, **kwargs): @@ -511,6 +536,9 @@ class BotBase(GroupMixin): cog = cog._inject(self) self.__cogs[cog.__cog_name__] = cog + if cog.aliases: + for alias in cog.aliases: + self.__cogs[alias] = cog def get_cog(self, name): """Gets the cog instance requested. @@ -549,6 +577,10 @@ class BotBase(GroupMixin): if cog is None: return + if cog.aliases: + for alias in cog.aliases: + self.__cogs.pop(alias) + help_command = self._help_command if help_command and help_command.cog is cog: help_command.cog = None @@ -850,6 +882,16 @@ class BotBase(GroupMixin): if not ret: raise ValueError("Iterable command_prefix must contain at least one prefix") + # if self.case_insensitive_prefix: + # if isinstance(ret, list): + # temp = [] + # for pre in ret: + # if pre in (self.user.mention + ' ', '<@!%s> ' % self.user.id): + # continue + # temp += list(map(''.join, itertools.product(*((c.upper(), c.lower()) for c in pre)))) + # ret = temp + # else: + # ret = list(map(''.join, itertools.product(*((c.upper(), c.lower()) for c in ret)))) return ret async def get_context(self, message, *, cls=Context): @@ -1024,6 +1066,10 @@ class Bot(BotBase, discord.Client): matches messages starting with ``!?``. This is especially important when passing an empty string, it should always be last as no prefix after it will be matched. + case_insensitive_prefix: :class:`bool` + Wheter the provided command_prefix should be case insensitive or not + + .. versionadded:: 1.6.0.7 case_insensitive: :class:`bool` Whether the commands should be case insensitive. Defaults to ``False``. This attribute does not carry over to groups. You must set it to every group if diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 085bdb97..21447c2a 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -89,6 +89,11 @@ class CogMeta(type): @commands.command(hidden=False) async def bar(self, ctx): pass # hidden -> False + + aliases: :class:`list` + A list of aliases for the cog name. + + .. versionadded:: 1.6.0.7 """ def __new__(cls, *args, **kwargs): @@ -96,6 +101,11 @@ class CogMeta(type): attrs['__cog_name__'] = kwargs.pop('name', name) attrs['__cog_settings__'] = kwargs.pop('command_attrs', {}) + aliases = kwargs.pop('aliases', []) + if not isinstance(aliases, list): + raise TypeError("Cog aliases must be a list, not a {0}".format(type(aliases))) + attrs['aliases'] = aliases + description = kwargs.pop('description', None) if description is None: description = inspect.cleandoc(attrs.get('__doc__', '')) diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index cbd28597..b6d94883 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -21,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +import re import discord.abc import discord.utils @@ -95,6 +96,15 @@ class Context(discord.abc.Messageable): self.command_failed = attrs.pop('command_failed', False) self._state = self.message._state + @property + def clean_prefix(self): + """:class:`str`: The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``. + + .. versionadded:: 1.5.1.4""" + user = self.guild.me if self.guild else self.bot.user + pattern = re.compile(r"<@!?%s>" % user.id) + return pattern.sub("@%s" % user.display_name.replace('\\', r'\\'), self.prefix) + async def invoke(self, command, /, *args, **kwargs): r"""|coro| diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index f9a8592c..54f3011b 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -157,7 +157,7 @@ class MemberConverter(IDConverter[discord.Member]): # If we're being rate limited on the WS, then fall back to using the HTTP API # So we don't have to wait ~60 seconds for the query to finish try: - member = await guild.fetch_member(user_id) + member = await guild.try_member(user_id) except discord.HTTPException: return None @@ -233,7 +233,7 @@ class UserConverter(IDConverter[discord.User]): result = ctx.bot.get_user(user_id) or _utils_get(ctx.message.mentions, id=user_id) if result is None: try: - result = await ctx.bot.fetch_user(user_id) + result = await ctx.bot.try_user(user_id) except discord.HTTPException: raise UserNotFound(argument) from None @@ -617,8 +617,8 @@ ColorConverter = ColourConverter class RoleConverter(IDConverter[discord.Role]): """Converts to a :class:`~discord.Role`. - All lookups are via the local guild. If in a DM context, then the lookup - is done by the global cache. + All lookups are via the local guild. If in a DM context, the converter raises + :exc:`.NoPrivateMessage` exception. The lookup strategy is as follows (in order): diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 117da590..bf57ca6c 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -276,7 +276,7 @@ class HelpCommand: If ``None``, only calls :attr:`.Commands.checks` in a guild setting. If ``False``, never calls :attr:`.Commands.checks`. Defaults to ``True``. - ..versionchanged:: 1.7 + .. versionchanged:: 1.7 command_attrs: :class:`dict` A dictionary of options to pass in for the construction of the help command. This allows you to change the command behaviour without actually changing diff --git a/discord/ext/menus/__init__.py b/discord/ext/menus/__init__.py new file mode 100644 index 00000000..142a95bd --- /dev/null +++ b/discord/ext/menus/__init__.py @@ -0,0 +1,1202 @@ +# -*- coding: utf-8 -*- + +""" +The MIT License (MIT) + +Copyright (c) 2015-2019 Rapptz + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +""" + +import asyncio +import discord + +import itertools +import inspect +import bisect +import re +from collections import OrderedDict, namedtuple + +# Needed for the setup.py script +__version__ = '1.0.0-a' + +class MenuError(Exception): + pass + +class CannotEmbedLinks(MenuError): + def __init__(self): + super().__init__('Bot does not have embed links permission in this channel.') + +class CannotSendMessages(MenuError): + def __init__(self): + super().__init__('Bot cannot send messages in this channel.') + +class CannotAddReactions(MenuError): + def __init__(self): + super().__init__('Bot cannot add reactions in this channel.') + +class CannotReadMessageHistory(MenuError): + def __init__(self): + super().__init__('Bot does not have Read Message History permissions in this channel.') + +class Position: + __slots__ = ('number', 'bucket') + + def __init__(self, number, *, bucket=1): + self.bucket = bucket + self.number = number + + def __lt__(self, other): + if not isinstance(other, Position) or not isinstance(self, Position): + return NotImplemented + + return (self.bucket, self.number) < (other.bucket, other.number) + + def __eq__(self, other): + return isinstance(other, Position) and other.bucket == self.bucket and other.number == self.number + + def __le__(self, other): + r = Position.__lt__(other, self) + if r is NotImplemented: + return NotImplemented + return not r + + def __gt__(self, other): + return Position.__lt__(other, self) + + def __ge__(self, other): + r = Position.__lt__(self, other) + if r is NotImplemented: + return NotImplemented + return not r + + def __repr__(self): + return '<{0.__class__.__name__}: {0.number}>'.format(self) + +class Last(Position): + __slots__ = () + def __init__(self, number=0): + super().__init__(number, bucket=2) + +class First(Position): + __slots__ = () + def __init__(self, number=0): + super().__init__(number, bucket=0) + +_custom_emoji = re.compile(r'a)?:?(?P[A-Za-z0-9\_]+):(?P[0-9]{13,21})>?') + +def _cast_emoji(obj, *, _custom_emoji=_custom_emoji): + if isinstance(obj, discord.PartialEmoji): + return obj + + obj = str(obj) + match = _custom_emoji.match(obj) + if match is not None: + groups = match.groupdict() + animated = bool(groups['animated']) + emoji_id = int(groups['id']) + name = groups['name'] + return discord.PartialEmoji(name=name, animated=animated, id=emoji_id) + return discord.PartialEmoji(name=obj, id=None, animated=False) + +class Button: + """Represents a reaction-style button for the :class:`Menu`. + + There are two ways to create this, the first being through explicitly + creating this class and the second being through the decorator interface, + :func:`button`. + + The action must have both a ``self`` and a ``payload`` parameter + of type :class:`discord.RawReactionActionEvent`. + + Attributes + ------------ + emoji: :class:`discord.PartialEmoji` + The emoji to use as the button. Note that passing a string will + transform it into a :class:`discord.PartialEmoji`. + action + A coroutine that is called when the button is pressed. + skip_if: Optional[Callable[[:class:`Menu`], :class:`bool`]] + A callable that detects whether it should be skipped. + A skipped button does not show up in the reaction list + and will not be processed. + position: :class:`Position` + The position the button should have in the initial order. + Note that since Discord does not actually maintain reaction + order, this is a best effort attempt to have an order until + the user restarts their client. Defaults to ``Position(0)``. + lock: :class:`bool` + Whether the button should lock all other buttons from being processed + until this button is done. Defaults to ``True``. + """ + __slots__ = ('emoji', '_action', '_skip_if', 'position', 'lock') + + def __init__(self, emoji, action, *, skip_if=None, position=None, lock=True): + self.emoji = _cast_emoji(emoji) + self.action = action + self.skip_if = skip_if + self.position = position or Position(0) + self.lock = lock + + @property + def skip_if(self): + return self._skip_if + + @skip_if.setter + def skip_if(self, value): + if value is None: + self._skip_if = lambda x: False + return + + try: + menu_self = value.__self__ + except AttributeError: + self._skip_if = value + else: + # Unfurl the method to not be bound + if not isinstance(menu_self, Menu): + raise TypeError('skip_if bound method must be from Menu not %r' % menu_self) + + self._skip_if = value.__func__ + + @property + def action(self): + return self._action + + @action.setter + def action(self, value): + try: + menu_self = value.__self__ + except AttributeError: + pass + else: + # Unfurl the method to not be bound + if not isinstance(menu_self, Menu): + raise TypeError('action bound method must be from Menu not %r' % menu_self) + + value = value.__func__ + + if not inspect.iscoroutinefunction(value): + raise TypeError('action must be a coroutine not %r' % value) + + self._action = value + + def __call__(self, menu, payload): + if self.skip_if(menu): + return + return self._action(menu, payload) + + def __str__(self): + return str(self.emoji) + + def is_valid(self, menu): + return not self.skip_if(menu) + +def button(emoji, **kwargs): + """Denotes a method to be button for the :class:`Menu`. + + The methods being wrapped must have both a ``self`` and a ``payload`` + parameter of type :class:`discord.RawReactionActionEvent`. + + The keyword arguments are forwarded to the :class:`Button` constructor. + + Example + --------- + + .. code-block:: python3 + + class MyMenu(Menu): + async def send_initial_message(self, ctx, channel): + return await channel.send(f'Hello {ctx.author}') + + @button('\\N{THUMBS UP SIGN}') + async def on_thumbs_up(self, payload): + await self.message.edit(content=f'Thanks {self.ctx.author}!') + + @button('\\N{THUMBS DOWN SIGN}') + async def on_thumbs_down(self, payload): + await self.message.edit(content=f"That's not nice {self.ctx.author}...") + + Parameters + ------------ + emoji: Union[:class:`str`, :class:`discord.PartialEmoji`] + The emoji to use for the button. + """ + def decorator(func): + func.__menu_button__ = _cast_emoji(emoji) + func.__menu_button_kwargs__ = kwargs + return func + return decorator + +class _MenuMeta(type): + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # This is needed to maintain member order for the buttons + return OrderedDict() + + def __new__(cls, name, bases, attrs, **kwargs): + buttons = [] + new_cls = super().__new__(cls, name, bases, attrs) + + inherit_buttons = kwargs.pop('inherit_buttons', True) + if inherit_buttons: + # walk MRO to get all buttons even in subclasses + for base in reversed(new_cls.__mro__): + for elem, value in base.__dict__.items(): + try: + value.__menu_button__ + except AttributeError: + continue + else: + buttons.append(value) + else: + for elem, value in attrs.items(): + try: + value.__menu_button__ + except AttributeError: + continue + else: + buttons.append(value) + + new_cls.__menu_buttons__ = buttons + return new_cls + + def get_buttons(cls): + buttons = OrderedDict() + for func in cls.__menu_buttons__: + emoji = func.__menu_button__ + buttons[emoji] = Button(emoji, func, **func.__menu_button_kwargs__) + return buttons + +class Menu(metaclass=_MenuMeta): + r"""An interface that allows handling menus by using reactions as buttons. + + Buttons should be marked with the :func:`button` decorator. Please note that + this expects the methods to have a single parameter, the ``payload``. This + ``payload`` is of type :class:`discord.RawReactionActionEvent`. + + Attributes + ------------ + timeout: :class:`float` + The timeout to wait between button inputs. + delete_message_after: :class:`bool` + Whether to delete the message after the menu interaction is done. + clear_reactions_after: :class:`bool` + Whether to clear reactions after the menu interaction is done. + Note that :attr:`delete_message_after` takes priority over this attribute. + If the bot does not have permissions to clear the reactions then it will + delete the reactions one by one. + check_embeds: :class:`bool` + Whether to verify embed permissions as well. + ctx: Optional[:class:`commands.Context`] + The context that started this pagination session or ``None`` if it hasn't + been started yet. + bot: Optional[:class:`commands.Bot`] + The bot that is running this pagination session or ``None`` if it hasn't + been started yet. + message: Optional[:class:`discord.Message`] + The message that has been sent for handling the menu. This is the returned + message of :meth:`send_initial_message`. You can set it in order to avoid + calling :meth:`send_initial_message`\, if for example you have a pre-existing + message you want to attach a menu to. + """ + def __init__(self, *, timeout=180.0, delete_message_after=False, + clear_reactions_after=False, check_embeds=False, message=None): + + self.timeout = timeout + self.delete_message_after = delete_message_after + self.clear_reactions_after = clear_reactions_after + self.check_embeds = check_embeds + self._can_remove_reactions = False + self.__tasks = [] + self._running = True + self.message = message + self.ctx = None + self.bot = None + self._author_id = None + self._buttons = self.__class__.get_buttons() + self._lock = asyncio.Lock() + self._event = asyncio.Event() + + @discord.utils.cached_property + def buttons(self): + """Retrieves the buttons that are to be used for this menu session. + + Skipped buttons are not in the resulting dictionary. + + Returns + --------- + Mapping[:class:`str`, :class:`Button`] + A mapping of button emoji to the actual button class. + """ + buttons = sorted(self._buttons.values(), key=lambda b: b.position) + return { + button.emoji: button + for button in buttons + if button.is_valid(self) + } + + def add_button(self, button, *, react=False): + """|maybecoro| + + Adds a button to the list of buttons. + + If the menu has already been started then the button will + not be added unless the ``react`` keyword-only argument is + set to ``True``. Note that when this happens this function + will need to be awaited. + + If a button with the same emoji is added then it is overridden. + + .. warning:: + + If the menu has started and the reaction is added, the order + property of the newly added button is ignored due to an API + limitation with Discord and the fact that reaction ordering + is not guaranteed. + + Parameters + ------------ + button: :class:`Button` + The button to add. + react: :class:`bool` + Whether to add a reaction if the menu has been started. + Note this turns the method into a coroutine. + + Raises + --------- + MenuError + Tried to use ``react`` when the menu had not been started. + discord.HTTPException + Adding the reaction failed. + """ + + self._buttons[button.emoji] = button + + if react: + if self.__tasks: + async def wrapped(): + # Add the reaction + try: + await self.message.add_reaction(button.emoji) + except discord.HTTPException: + raise + else: + # Update the cache to have the value + self.buttons[button.emoji] = button + + return wrapped() + + async def dummy(): + raise MenuError('Menu has not been started yet') + return dummy() + + def remove_button(self, emoji, *, react=False): + """|maybecoro| + + Removes a button from the list of buttons. + + This operates similar to :meth:`add_button`. + + Parameters + ------------ + emoji: Union[:class:`Button`, :class:`str`] + The emoji or the button to remove. + react: :class:`bool` + Whether to remove the reaction if the menu has been started. + Note this turns the method into a coroutine. + + Raises + --------- + MenuError + Tried to use ``react`` when the menu had not been started. + discord.HTTPException + Removing the reaction failed. + """ + + if isinstance(emoji, Button): + emoji = emoji.emoji + else: + emoji = _cast_emoji(emoji) + + self._buttons.pop(emoji, None) + + if react: + if self.__tasks: + async def wrapped(): + # Remove the reaction from being processable + # Removing it from the cache first makes it so the check + # doesn't get triggered. + self.buttons.pop(emoji, None) + await self.message.remove_reaction(emoji, self.__me) + return wrapped() + + async def dummy(): + raise MenuError('Menu has not been started yet') + return dummy() + + def clear_buttons(self, *, react=False): + """|maybecoro| + + Removes all buttons from the list of buttons. + + If the menu has already been started then the buttons will + not be removed unless the ``react`` keyword-only argument is + set to ``True``. Note that when this happens this function + will need to be awaited. + + Parameters + ------------ + react: :class:`bool` + Whether to clear the reactions if the menu has been started. + Note this turns the method into a coroutine. + + Raises + --------- + MenuError + Tried to use ``react`` when the menu had not been started. + discord.HTTPException + Clearing the reactions failed. + """ + + self._buttons.clear() + + if react: + if self.__tasks: + async def wrapped(): + # A fast path if we have permissions + if self._can_remove_reactions: + try: + del self.buttons + except AttributeError: + pass + finally: + await self.message.clear_reactions() + return + + # Remove the cache (the next call will have the updated buttons) + reactions = list(self.buttons.keys()) + try: + del self.buttons + except AttributeError: + pass + + for reaction in reactions: + await self.message.remove_reaction(reaction, self.__me) + + return wrapped() + async def dummy(): + raise MenuError('Menu has not been started yet') + return dummy() + + def should_add_reactions(self): + """:class:`bool`: Whether to add reactions to this menu session.""" + return len(self.buttons) + + def _verify_permissions(self, ctx, channel, permissions): + if not permissions.send_messages: + raise CannotSendMessages() + + if self.check_embeds and not permissions.embed_links: + raise CannotEmbedLinks() + + self._can_remove_reactions = permissions.manage_messages + if self.should_add_reactions(): + if not permissions.add_reactions: + raise CannotAddReactions() + if not permissions.read_message_history: + raise CannotReadMessageHistory() + + def reaction_check(self, payload): + """The function that is used to check whether the payload should be processed. + This is passed to :meth:`discord.ext.commands.Bot.wait_for `. + + There should be no reason to override this function for most users. + + Parameters + ------------ + payload: :class:`discord.RawReactionActionEvent` + The payload to check. + + Returns + --------- + :class:`bool` + Whether the payload should be processed. + """ + if payload.message_id != self.message.id: + return False + if payload.user_id not in {self.bot.owner_id, self._author_id, *self.bot.owner_ids}: + return False + + return payload.emoji in self.buttons + + async def _internal_loop(self): + try: + self.__timed_out = False + loop = self.bot.loop + # Ensure the name exists for the cancellation handling + tasks = [] + while self._running: + tasks = [ + asyncio.ensure_future(self.bot.wait_for('raw_reaction_add', check=self.reaction_check)), + asyncio.ensure_future(self.bot.wait_for('raw_reaction_remove', check=self.reaction_check)) + ] + done, pending = await asyncio.wait(tasks, timeout=self.timeout, return_when=asyncio.FIRST_COMPLETED) + for task in pending: + task.cancel() + + if len(done) == 0: + raise asyncio.TimeoutError() + + # Exception will propagate if e.g. cancelled or timed out + payload = done.pop().result() + loop.create_task(self.update(payload)) + + # NOTE: Removing the reaction ourselves after it's been done when + # mixed with the checks above is incredibly racy. + # There is no guarantee when the MESSAGE_REACTION_REMOVE event will + # be called, and chances are when it does happen it'll always be + # after the remove_reaction HTTP call has returned back to the caller + # which means that the stuff above will catch the reaction that we + # just removed. + + # For the future sake of myself and to save myself the hours in the future + # consider this my warning. + + except asyncio.TimeoutError: + self.__timed_out = True + finally: + self._event.set() + + # Cancel any outstanding tasks (if any) + for task in tasks: + task.cancel() + + try: + await self.finalize(self.__timed_out) + except Exception: + pass + finally: + self.__timed_out = False + + # Can't do any requests if the bot is closed + if self.bot.is_closed(): + return + + # Wrap it in another block anyway just to ensure + # nothing leaks out during clean-up + try: + if self.delete_message_after: + return await self.message.delete() + + if self.clear_reactions_after: + if self._can_remove_reactions: + return await self.message.clear_reactions() + + for button_emoji in self.buttons: + try: + await self.message.remove_reaction(button_emoji, self.__me) + except discord.HTTPException: + continue + except Exception: + pass + + async def update(self, payload): + """|coro| + + Updates the menu after an event has been received. + + Parameters + ----------- + payload: :class:`discord.RawReactionActionEvent` + The reaction event that triggered this update. + """ + button = self.buttons[payload.emoji] + if not self._running: + return + + try: + if button.lock: + async with self._lock: + if self._running: + await button(self, payload) + else: + await button(self, payload) + except Exception: + # TODO: logging? + import traceback + traceback.print_exc() + + async def start(self, ctx, *, channel=None, wait=False): + """|coro| + + Starts the interactive menu session. + + Parameters + ----------- + ctx: :class:`Context` + The invocation context to use. + channel: :class:`discord.abc.Messageable` + The messageable to send the message to. If not given + then it defaults to the channel in the context. + wait: :class:`bool` + Whether to wait until the menu is completed before + returning back to the caller. + + Raises + ------- + MenuError + An error happened when verifying permissions. + discord.HTTPException + Adding a reaction failed. + """ + + # Clear the buttons cache and re-compute if possible. + try: + del self.buttons + except AttributeError: + pass + + self.bot = bot = ctx.bot + self.ctx = ctx + self._author_id = ctx.author.id + channel = channel or ctx.channel + is_guild = isinstance(channel, discord.abc.GuildChannel) + me = ctx.guild.me if is_guild else ctx.bot.user + permissions = channel.permissions_for(me) + self.__me = discord.Object(id=me.id) + self._verify_permissions(ctx, channel, permissions) + self._event.clear() + msg = self.message + if msg is None: + self.message = msg = await self.send_initial_message(ctx, channel) + + if self.should_add_reactions(): + # Start the task first so we can listen to reactions before doing anything + for task in self.__tasks: + task.cancel() + self.__tasks.clear() + + self._running = True + self.__tasks.append(bot.loop.create_task(self._internal_loop())) + + async def add_reactions_task(): + for emoji in self.buttons: + await msg.add_reaction(emoji) + self.__tasks.append(bot.loop.create_task(add_reactions_task())) + + if wait: + await self._event.wait() + + async def finalize(self, timed_out): + """|coro| + + A coroutine that is called when the menu loop has completed + its run. This is useful if some asynchronous clean-up is + required after the fact. + + Parameters + -------------- + timed_out: :class:`bool` + Whether the menu completed due to timing out. + """ + return + + async def send_initial_message(self, ctx, channel): + """|coro| + + Sends the initial message for the menu session. + + This is internally assigned to the :attr:`message` attribute. + + Subclasses must implement this if they don't set the + :attr:`message` attribute themselves before starting the + menu via :meth:`start`. + + Parameters + ------------ + ctx: :class:`Context` + The invocation context to use. + channel: :class:`discord.abc.Messageable` + The messageable to send the message to. + + Returns + -------- + :class:`discord.Message` + The message that has been sent. + """ + raise NotImplementedError + + def stop(self): + """Stops the internal loop.""" + self._running = False + for task in self.__tasks: + task.cancel() + self.__tasks.clear() + +class PageSource: + """An interface representing a menu page's data source for the actual menu page. + + Subclasses must implement the backing resource along with the following methods: + + - :meth:`get_page` + - :meth:`is_paginating` + - :meth:`format_page` + """ + async def _prepare_once(self): + try: + # Don't feel like formatting hasattr with + # the proper mangling + # read this as follows: + # if hasattr(self, '__prepare') + # except that it works as you expect + self.__prepare + except AttributeError: + await self.prepare() + self.__prepare = True + + async def prepare(self): + """|coro| + + A coroutine that is called after initialisation + but before anything else to do some asynchronous set up + as well as the one provided in ``__init__``. + + By default this does nothing. + + This coroutine will only be called once. + """ + return + + def is_paginating(self): + """An abstract method that notifies the :class:`MenuPages` whether or not + to start paginating. This signals whether to add reactions or not. + + Subclasses must implement this. + + Returns + -------- + :class:`bool` + Whether to trigger pagination. + """ + raise NotImplementedError + + def get_max_pages(self): + """An optional abstract method that retrieves the maximum number of pages + this page source has. Useful for UX purposes. + + The default implementation returns ``None``. + + Returns + -------- + Optional[:class:`int`] + The maximum number of pages required to properly + paginate the elements, if given. + """ + return None + + async def get_page(self, page_number): + """|coro| + + An abstract method that retrieves an object representing the object to format. + + Subclasses must implement this. + + .. note:: + + The page_number is zero-indexed between [0, :meth:`get_max_pages`), + if there is a maximum number of pages. + + Parameters + ----------- + page_number: :class:`int` + The page number to access. + + Returns + --------- + Any + The object represented by that page. + This is passed into :meth:`format_page`. + """ + raise NotImplementedError + + async def format_page(self, menu, page): + """|maybecoro| + + An abstract method to format the page. + + This method must return one of the following types. + + If this method returns a ``str`` then it is interpreted as returning + the ``content`` keyword argument in :meth:`discord.Message.edit` + and :meth:`discord.abc.Messageable.send`. + + If this method returns a :class:`discord.Embed` then it is interpreted + as returning the ``embed`` keyword argument in :meth:`discord.Message.edit` + and :meth:`discord.abc.Messageable.send`. + + If this method returns a ``dict`` then it is interpreted as the + keyword-arguments that are used in both :meth:`discord.Message.edit` + and :meth:`discord.abc.Messageable.send`. The two of interest are + ``embed`` and ``content``. + + Parameters + ------------ + menu: :class:`Menu` + The menu that wants to format this page. + page: Any + The page returned by :meth:`PageSource.get_page`. + + Returns + --------- + Union[:class:`str`, :class:`discord.Embed`, :class:`dict`] + See above. + """ + raise NotImplementedError + +class MenuPages(Menu): + """A special type of Menu dedicated to pagination. + + Attributes + ------------ + current_page: :class:`int` + The current page that we are in. Zero-indexed + between [0, :attr:`PageSource.max_pages`). + """ + def __init__(self, source, **kwargs): + self._source = source + self.current_page = 0 + super().__init__(**kwargs) + + @property + def source(self): + """:class:`PageSource`: The source where the data comes from.""" + return self._source + + async def change_source(self, source): + """|coro| + + Changes the :class:`PageSource` to a different one at runtime. + + Once the change has been set, the menu is moved to the first + page of the new source if it was started. This effectively + changes the :attr:`current_page` to 0. + + Raises + -------- + TypeError + A :class:`PageSource` was not passed. + """ + + if not isinstance(source, PageSource): + raise TypeError('Expected {0!r} not {1.__class__!r}.'.format(PageSource, source)) + + self._source = source + self.current_page = 0 + if self.message is not None: + await source._prepare_once() + await self.show_page(0) + + def should_add_reactions(self): + return self._source.is_paginating() + + async def _get_kwargs_from_page(self, page): + value = await discord.utils.maybe_coroutine(self._source.format_page, self, page) + if isinstance(value, dict): + return value + elif isinstance(value, str): + return { 'content': value, 'embed': None } + elif isinstance(value, discord.Embed): + return { 'embed': value, 'content': None } + + async def show_page(self, page_number): + page = await self._source.get_page(page_number) + self.current_page = page_number + kwargs = await self._get_kwargs_from_page(page) + await self.message.edit(**kwargs) + + async def send_initial_message(self, ctx, channel): + """|coro| + + The default implementation of :meth:`Menu.send_initial_message` + for the interactive pagination session. + + This implementation shows the first page of the source. + """ + page = await self._source.get_page(0) + kwargs = await self._get_kwargs_from_page(page) + return await channel.send(**kwargs) + + async def start(self, ctx, *, channel=None, wait=False): + await self._source._prepare_once() + await super().start(ctx, channel=channel, wait=wait) + + async def show_checked_page(self, page_number): + max_pages = self._source.get_max_pages() + try: + if max_pages is None: + # If it doesn't give maximum pages, it cannot be checked + await self.show_page(page_number) + elif max_pages > page_number >= 0: + await self.show_page(page_number) + except IndexError: + # An error happened that can be handled, so ignore it. + pass + + async def show_current_page(self): + if self._source.paginating: + await self.show_page(self.current_page) + + def _skip_double_triangle_buttons(self): + max_pages = self._source.get_max_pages() + if max_pages is None: + return True + return max_pages <= 2 + + @button('\N{BLACK LEFT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR}\ufe0f', + position=First(0), skip_if=_skip_double_triangle_buttons) + async def go_to_first_page(self, payload): + """go to the first page""" + await self.show_page(0) + + @button('\N{BLACK LEFT-POINTING TRIANGLE}\ufe0f', position=First(1)) + async def go_to_previous_page(self, payload): + """go to the previous page""" + await self.show_checked_page(self.current_page - 1) + + @button('\N{BLACK RIGHT-POINTING TRIANGLE}\ufe0f', position=Last(0)) + async def go_to_next_page(self, payload): + """go to the next page""" + await self.show_checked_page(self.current_page + 1) + + @button('\N{BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR}\ufe0f', + position=Last(1), skip_if=_skip_double_triangle_buttons) + async def go_to_last_page(self, payload): + """go to the last page""" + # The call here is safe because it's guarded by skip_if + await self.show_page(self._source.get_max_pages() - 1) + + @button('\N{BLACK SQUARE FOR STOP}\ufe0f', position=Last(2)) + async def stop_pages(self, payload): + """stops the pagination session.""" + self.stop() + +class ListPageSource(PageSource): + """A data source for a sequence of items. + + This page source does not handle any sort of formatting, leaving it up + to the user. To do so, implement the :meth:`format_page` method. + + Attributes + ------------ + entries: Sequence[Any] + The sequence of items to paginate. + per_page: :class:`int` + How many elements are in a page. + """ + + def __init__(self, entries, *, per_page): + self.entries = entries + self.per_page = per_page + + pages, left_over = divmod(len(entries), per_page) + if left_over: + pages += 1 + + self._max_pages = pages + + def is_paginating(self): + """:class:`bool`: Whether pagination is required.""" + return len(self.entries) > self.per_page + + def get_max_pages(self): + """:class:`int`: The maximum number of pages required to paginate this sequence.""" + return self._max_pages + + async def get_page(self, page_number): + """Returns either a single element of the sequence or + a slice of the sequence. + + If :attr:`per_page` is set to ``1`` then this returns a single + element. Otherwise it returns at most :attr:`per_page` elements. + + Returns + --------- + Union[Any, List[Any]] + The data returned. + """ + if self.per_page == 1: + return self.entries[page_number] + else: + base = page_number * self.per_page + return self.entries[base:base + self.per_page] + +_GroupByEntry = namedtuple('_GroupByEntry', 'key items') + +class GroupByPageSource(ListPageSource): + """A data source for grouped by sequence of items. + + This inherits from :class:`ListPageSource`. + + This page source does not handle any sort of formatting, leaving it up + to the user. To do so, implement the :meth:`format_page` method. + + Parameters + ------------ + entries: Sequence[Any] + The sequence of items to paginate and group. + key: Callable[[Any], Any] + A key function to do the grouping with. + sort: :class:`bool` + Whether to sort the sequence before grouping it. + The elements are sorted according to the ``key`` function passed. + per_page: :class:`int` + How many elements to have per page of the group. + """ + def __init__(self, entries, *, key, per_page, sort=True): + self.__entries = entries if not sort else sorted(entries, key=key) + nested = [] + self.nested_per_page = per_page + for k, g in itertools.groupby(self.__entries, key=key): + g = list(g) + if not g: + continue + size = len(g) + + # Chunk the nested pages + nested.extend(_GroupByEntry(key=k, items=g[i:i+per_page]) for i in range(0, size, per_page)) + + super().__init__(nested, per_page=1) + + async def get_page(self, page_number): + return self.entries[page_number] + + async def format_page(self, menu, entry): + """An abstract method to format the page. + + This works similar to the :meth:`ListPageSource.format_page` except + the return type of the ``entry`` parameter is documented. + + Parameters + ------------ + menu: :class:`Menu` + The menu that wants to format this page. + entry + A namedtuple with ``(key, items)`` representing the key of the + group by function and a sequence of paginated items within that + group. + + Returns + --------- + :class:`dict` + A dictionary representing keyword-arguments to pass to + the message related calls. + """ + raise NotImplementedError + +def _aiter(obj, *, _isasync=inspect.iscoroutinefunction): + cls = obj.__class__ + try: + async_iter = cls.__aiter__ + except AttributeError: + raise TypeError('{0.__name__!r} object is not an async iterable'.format(cls)) + + async_iter = async_iter(obj) + if _isasync(async_iter): + raise TypeError('{0.__name__!r} object is not an async iterable'.format(cls)) + return async_iter + +class AsyncIteratorPageSource(PageSource): + """A data source for data backed by an asynchronous iterator. + + This page source does not handle any sort of formatting, leaving it up + to the user. To do so, implement the :meth:`format_page` method. + + Parameters + ------------ + iter: AsyncIterator[Any] + The asynchronous iterator to paginate. + per_page: :class:`int` + How many elements to have per page. + """ + + def __init__(self, iterator, *, per_page): + self.iterator = _aiter(iterator) + self.per_page = per_page + self._exhausted = False + self._cache = [] + + async def _iterate(self, n): + it = self.iterator + cache = self._cache + for i in range(0, n): + try: + elem = await it.__anext__() + except StopAsyncIteration: + self._exhausted = True + break + else: + cache.append(elem) + + async def prepare(self, *, _aiter=_aiter): + # Iterate until we have at least a bit more single page + await self._iterate(self.per_page + 1) + + def is_paginating(self): + """:class:`bool`: Whether pagination is required.""" + return len(self._cache) > self.per_page + + async def _get_single_page(self, page_number): + if page_number < 0: + raise IndexError('Negative page number.') + + if not self._exhausted and len(self._cache) <= page_number: + await self._iterate((page_number + 1) - len(self._cache)) + return self._cache[page_number] + + async def _get_page_range(self, page_number): + if page_number < 0: + raise IndexError('Negative page number.') + + base = page_number * self.per_page + max_base = base + self.per_page + if not self._exhausted and len(self._cache) <= max_base: + await self._iterate((max_base + 1) - len(self._cache)) + + entries = self._cache[base:max_base] + if not entries and max_base > len(self._cache): + raise IndexError('Went too far') + return entries + + async def get_page(self, page_number): + """Returns either a single element of the sequence or + a slice of the sequence. + + If :attr:`per_page` is set to ``1`` then this returns a single + element. Otherwise it returns at most :attr:`per_page` elements. + + Returns + --------- + Union[Any, List[Any]] + The data returned. + """ + if self.per_page == 1: + return await self._get_single_page(page_number) + else: + return await self._get_page_range(page_number) diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 4c587e86..7ad9edee 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -111,13 +111,13 @@ class Loop: raise await asyncio.sleep(backoff.delay()) else: + await sleep_until(self._next_iteration) + if self._stop_next_iteration: return self._current_loop += 1 if self._current_loop == self.count: break - - await sleep_until(self._next_iteration) except asyncio.CancelledError: self._is_being_cancelled = True raise diff --git a/discord/flags.py b/discord/flags.py index af75132d..26982678 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -422,6 +422,22 @@ class Intents(BaseFlags): raise TypeError(f'{key!r} is not a valid flag name.') setattr(self, key, value) + @classmethod + def from_list(cls, intents_list): + """A factory method that creates a :class:`Intents` with everything enabled + that has been passed in the list. + + .. versionadded:: 1.5.0.1""" + for item in intents_list: + if item not in cls.VALID_FLAGS.keys(): + intents_list.remove(item) + + self = cls.none() + for item in intents_list: + setattr(self, item, True) + + return self + @classmethod def all(cls: Type[Intents]) -> Intents: """A factory method that creates a :class:`Intents` with everything enabled.""" @@ -593,6 +609,7 @@ class Intents(BaseFlags): @flag_value def presences(self): + """:class:`bool`: Whether guild presence related events are enabled. This corresponds to the following events: diff --git a/discord/guild.py b/discord/guild.py index 51d2004f..3ed06e4f 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -26,23 +26,23 @@ import copy from collections import namedtuple from . import utils -from .role import Role -from .member import Member, VoiceState -from .emoji import Emoji -from .errors import InvalidData -from .permissions import PermissionOverwrite -from .colour import Colour -from .errors import InvalidArgument, ClientException -from .channel import * -from .enums import VoiceRegion, ChannelType, try_enum, VerificationLevel, ContentFilter, NotificationLevel -from .mixins import Hashable -from .user import User -from .invite import Invite -from .iterators import AuditLogIterator, MemberIterator -from .widget import Widget from .asset import Asset +from .channel import * +from .colour import Colour +from .emoji import Emoji +from .enums import (ChannelType, ContentFilter, NotificationLevel, + VerificationLevel, VoiceRegion, try_enum) +from .errors import ClientException, InvalidArgument, InvalidData from .flags import SystemChannelFlags from .integrations import Integration +from .invite import Invite +from .iterators import AuditLogIterator, MemberIterator +from .member import Member, VoiceState +from .mixins import Hashable +from .permissions import PermissionOverwrite +from .role import Role +from .user import User +from .widget import Widget __all__ = ( 'Guild', @@ -96,7 +96,7 @@ class Guild(Hashable): The guild owner's ID. Use :attr:`Guild.owner` instead. unavailable: :class:`bool` Indicates if the guild is unavailable. If this is ``True`` then the - reliability of other attributes outside of :meth:`Guild.id` is slim and they might + reliability of other attributes outside of :attr:`Guild.id` is slim and they might all be ``None``. It is best to not do anything with the guild if it is unavailable. Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events. @@ -208,6 +208,9 @@ class Guild(Hashable): def __str__(self): return self.name or '' + def __int__(self): + return self.id + def __repr__(self): attrs = ( ('id', self.id), @@ -531,6 +534,20 @@ class Guild(Hashable): """List[:class:`Member`]: A list of members that belong to this guild.""" return list(self._members.values()) + @property + def bots(self): + """List[:class:`Member`]: A list of bots that belong to this guild. + + .. versionadded:: 1.5.0.1""" + return list(m for m in self._members.values() if m.bot) + + @property + def humans(self): + """List[:class:`Member`]: A list of humans that belong to this guild. + + .. versionadded:: 1.5.0.1""" + return list(m for m in self._members.values() if not m.bot) + def get_member(self, user_id): """Returns a member with the given ID. @@ -611,8 +628,8 @@ class Guild(Hashable): @property def icon_url(self): - """:class:`Asset`: Returns the guild's icon asset.""" - return self.icon_url_as() + """:class:`str`: Returns the guild's direct icon url.""" + return str(self.icon_url_as(static_format="png")) def is_icon_animated(self): """:class:`bool`: Returns True if the guild has an animated icon.""" @@ -1112,8 +1129,8 @@ class Guild(Hashable): The new description of the guild. This is only available to guilds that contain ``PUBLIC`` in :attr:`Guild.features`. icon: :class:`bytes` - A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG supported - and GIF This is only available to guilds that contain ``ANIMATED_ICON`` in :attr:`Guild.features`. + A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG is supported. + GIF is only available to guilds that contain ``ANIMATED_ICON`` in :attr:`Guild.features`. Could be ``None`` to denote removal of the icon. banner: :class:`bytes` A :term:`py:bytes-like object` representing the banner. @@ -1313,7 +1330,7 @@ class Guild(Hashable): def convert(d): factory, ch_type = _channel_factory(d['type']) if factory is None: - raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data)) + raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(d)) channel = factory(guild=self, state=self._state, data=d) return channel @@ -1373,6 +1390,42 @@ class Guild(Hashable): return MemberIterator(self, limit=limit, after=after) + async def try_member(self, member_id): + """|coro| + + Retreives a :class:`Member` from a guild ID, and a member ID. + + .. versionadded:: 1.5.0.2 + + .. note:: + + This will first attempt to get the member from the cache. + If that fails, it will make an API call. + This method is an API call. For general usage, consider :meth:`get_member` instead. + + Parameters + ----------- + member_id: :class:`int` + The member's ID to fetch from. + + Raises + ------- + Forbidden + You do not have access to the guild. + HTTPException + Fetching the member failed. + + Returns + -------- + :class:`Member` + The member from the member ID. + """ + + member = self.get_member(member_id) + if member is None: + member = await self.fetch_member(member_id) + return member + async def fetch_member(self, member_id): """|coro| @@ -1380,7 +1433,7 @@ class Guild(Hashable): .. note:: - This method is an API call. For general usage, consider :meth:`get_member` instead. + This method is an API call. If you have :attr:`Intents.members` and member cache enabled, consider :meth:`get_member` instead. Parameters ----------- @@ -2207,7 +2260,8 @@ class Guild(Hashable): if not self._state._intents.members: raise ClientException('Intents.members must be enabled to use this.') - return await self._state.chunk_guild(self, cache=cache) + if not self._state.is_guild_evicted(self): + return await self._state.chunk_guild(self, cache=cache) async def query_members(self, query=None, *, limit=5, user_ids=None, presences=False, cache=True): """|coro| diff --git a/discord/http.py b/discord/http.py index 353410e4..5dddd357 100644 --- a/discord/http.py +++ b/discord/http.py @@ -701,6 +701,17 @@ class HTTPClient: def delete_channel(self, channel_id, *, reason=None): return self.request(Route('DELETE', '/channels/{channel_id}', channel_id=channel_id), reason=reason) + def create_party(self, channel_id, application_id, max_age: int, max_uses: int): + payload = { + 'max_age': max_age, + 'max_uses': max_uses, + 'target_application_id': application_id, + 'target_type': 2, + 'temporary': False, + 'validate': None + } + return self.request(Route("POST", "/channels/{channel_id}/invites", channel_id=channel_id), json=payload) + # Webhook management def create_webhook(self, channel_id, *, name, avatar=None, reason=None): diff --git a/discord/member.py b/discord/member.py index 753780d9..96613585 100644 --- a/discord/member.py +++ b/discord/member.py @@ -192,6 +192,13 @@ class Member(discord.abc.Messageable, _BaseUser): If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be ``None``. activities: Tuple[Union[:class:`BaseActivity`, :class:`Spotify`]] The activities that the user is currently doing. + + .. note:: + + Due to a Discord API limitation, a user's Spotify activity may not appear + if they are listening to a song with a title longer + than 128 characters. See :issue:`1738` for more information. + guild: :class:`Guild` The guild that the member belongs to. nick: Optional[:class:`str`] @@ -225,6 +232,9 @@ class Member(discord.abc.Messageable, _BaseUser): def __str__(self): return str(self._user) + def __int__(self): + return self.id + def __repr__(self): return f'' @@ -444,6 +454,12 @@ class Member(discord.abc.Messageable, _BaseUser): """Union[:class:`BaseActivity`, :class:`Spotify`]: Returns the primary activity the user is currently doing. Could be ``None`` if no activity is being done. + .. note:: + + Due to a Discord API limitation, this may be ``None`` if + the user is listening to a song on Spotify with a title longer + than 128 characters. See :issue:`1738` for more information. + .. note:: A user may have multiple activities, these can be accessed under :attr:`activities`. diff --git a/discord/message.py b/discord/message.py index a19f44ab..f9a6337b 100644 --- a/discord/message.py +++ b/discord/message.py @@ -131,6 +131,9 @@ class Attachment(Hashable): """:class:`bool`: Whether this attachment contains a spoiler.""" return self.filename.startswith('SPOILER_') + def __int__(self): + return self.id + def __repr__(self): return ''.format(self) @@ -339,6 +342,7 @@ class MessageReference: self.message_id = utils._get_as_snowflake(data, 'message_id') self.channel_id = int(data.pop('channel_id')) self.guild_id = utils._get_as_snowflake(data, 'guild_id') + self.fail_if_not_exists = data.get('fail_if_not_exists', True) self._state = state self.resolved = None return self @@ -368,6 +372,24 @@ class MessageReference: self._state = message._state return self + @classmethod + def from_message(cls, message): + """Creates a :class:`MessageReference` from an existing :class:`Message`. + + .. versionadded:: 1.5.1.5 + + Parameters + ---------- + message: :class:`Message` + The message to be converted into a reference. + + Returns + ------- + :class:`MessageReference` + A reference to the message. + """ + return cls(message._state, message_id=message.id, channel_id=message.channel.id, guild_id=message.guild and message.guild.id) + @property def cached_message(self): """Optional[:class:`~discord.Message`]: The cached message, if found in the internal message cache.""" @@ -579,6 +601,12 @@ class Message(Hashable): except KeyError: continue + def __str__(self): + return self.content + + def __int__(self): + return self.id + def __repr__(self): return ''.format(self) @@ -936,7 +964,7 @@ class Message(Hashable): if self.type is MessageType.guild_discovery_grace_period_final_warning: return 'This server has failed Discovery activity requirements for 3 weeks in a row. If this server fails for 1 more week, it will be removed from Discovery.' - async def delete(self, *, delay=None): + async def delete(self, *, delay=None, silent=False): """|coro| Deletes the message. @@ -948,12 +976,17 @@ class Message(Hashable): .. versionchanged:: 1.1 Added the new ``delay`` keyword-only parameter. + .. versionchanged:: 1.6.0.7 + Added the new ``silent`` keyword-only parameter. + Parameters ----------- delay: Optional[:class:`float`] If provided, the number of seconds to wait in the background before deleting the message. If the deletion fails then it is silently ignored. - + silent: :class:`bool` + If silent is set to ``True``, the error will not be raised, it will be ignored. + This defaults to ``False`` Raises ------ Forbidden @@ -973,7 +1006,13 @@ class Message(Hashable): asyncio.create_task(delete()) else: - await self._state.http.delete_message(self.channel.id, self.id) + try: + await self._state.http.delete_message(self.channel.id, self.id) + except Exception as e: + if silent: + pass + else: + raise e async def edit(self, **fields): """|coro| @@ -1072,8 +1111,10 @@ class Message(Hashable): Publishes this message to your announcement channel. + You must have the :attr:`~Permissions.send_messages` permission to do this. + If the message is not your own then the :attr:`~Permissions.manage_messages` - permission is needed. + permission is also needed. Raises ------- @@ -1262,8 +1303,8 @@ class Message(Hashable): async def reply(self, content=None, **kwargs): """|coro| - A shortcut method to :meth:`abc.Messageable.send` to reply to the - :class:`Message`. + A shortcut method to :meth:`.abc.Messageable.send` to reply to the + :class:`.Message`. .. versionadded:: 1.6 @@ -1279,7 +1320,7 @@ class Message(Hashable): Returns --------- - :class:`Message` + :class:`.Message` The message that was sent. """ diff --git a/discord/permissions.py b/discord/permissions.py index fe6cabf5..8639fb0d 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -283,6 +283,8 @@ class Permissions(BaseFlags): """ return 1 << 3 + admin = administrator + @flag_value def manage_channels(self): """:class:`bool`: Returns ``True`` if a user can edit, delete, or create channels in the guild. diff --git a/discord/role.py b/discord/role.py index 37fa8f8b..c129ef25 100644 --- a/discord/role.py +++ b/discord/role.py @@ -150,6 +150,9 @@ class Role(Hashable): def __str__(self): return self.name + def __int__(self): + return self.id + def __repr__(self): return ''.format(self) diff --git a/discord/state.py b/discord/state.py index 8374b30e..2a3ae770 100644 --- a/discord/state.py +++ b/discord/state.py @@ -801,6 +801,9 @@ class ConnectionState: return self._add_guild_from_data(data) + def is_guild_evicted(self, guild) -> bool: + return guild.id not in self._guilds + async def chunk_guild(self, guild, *, wait=True, cache=None): cache = cache or self.member_cache_flags.joined request = self._chunk_requests.get(guild.id) diff --git a/discord/sticker.py b/discord/sticker.py index 1240e357..6bdf0861 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -32,7 +32,7 @@ __all__ = ( ) class Sticker(Hashable): - """Represents a sticker + """Represents a sticker. .. versionadded:: 1.6 @@ -40,34 +40,34 @@ class Sticker(Hashable): .. describe:: str(x) - Returns the name of the sticker + Returns the name of the sticker. .. describe:: x == y - Checks if the sticker is equal to another sticker + Checks if the sticker is equal to another sticker. .. describe:: x != y - Checks if the sticker is not equal to another sticker + Checks if the sticker is not equal to another sticker. Attributes ---------- name: :class:`str` - The sticker's name + The sticker's name. id: :class:`int` - The id of the sticker + The id of the sticker. description: :class:`str` - The description of the sticker + The description of the sticker. pack_id: :class:`int` - The id of the sticker's pack + The id of the sticker's pack. format: :class:`StickerType` - The format for the sticker's image + The format for the sticker's image. image: :class:`str` - The sticker's image + The sticker's image. tags: List[:class:`str`] - A list of tags for the sticker + A list of tags for the sticker. preview_image: Optional[:class:`str`] - The sticker's preview asset hash + The sticker's preview asset hash. """ __slots__ = ('_state', 'id', 'name', 'description', 'pack_id', 'format', 'image', 'tags', 'preview_image') @@ -76,7 +76,7 @@ class Sticker(Hashable): self.id = int(data['id']) self.name = data['name'] self.description = data['description'] - self.pack_id = int(data['pack_id']) + self.pack_id = int(data.get('pack_id', 0)) self.format = try_enum(StickerType, data['format_type']) self.image = data['asset'] @@ -103,7 +103,7 @@ class Sticker(Hashable): """Returns an :class:`Asset` for the sticker's image. .. note:: - This will return ``None`` if the format is ``StickerType.lottie`` + This will return ``None`` if the format is ``StickerType.lottie``. Returns ------- diff --git a/discord/user.py b/discord/user.py index 8b134b40..0d869652 100644 --- a/discord/user.py +++ b/discord/user.py @@ -46,6 +46,9 @@ class BaseUser(_BaseUser): def __str__(self): return '{0.name}#{0.discriminator}'.format(self) + def __int__(self): + return self.id + def __eq__(self, other): return isinstance(other, _BaseUser) and other.id == self.id @@ -94,15 +97,12 @@ class BaseUser(_BaseUser): @property def avatar_url(self): - """:class:`Asset`: Returns an :class:`Asset` for the avatar the user has. + """:class:`str`: Returns an direct url for the avatar the user has. If the user does not have a traditional avatar, an asset for the default avatar is returned instead. - - This is equivalent to calling :meth:`avatar_url_as` with - the default parameters (i.e. webp/gif detection and a size of 1024). """ - return self.avatar_url_as(format=None, size=1024) + return str(self.avatar_url_as(static_format="png", size=1024)) def is_avatar_animated(self): """:class:`bool`: Indicates if the user has an animated avatar.""" @@ -269,7 +269,16 @@ class ClientUser(BaseUser): .. versionadded:: 1.3 verified: :class:`bool` +<<<<<<< HEAD + Specifies if the user's email is verified. + email: Optional[:class:`str`] + The email the user used when registering. + + .. deprecated:: 1.7 + +======= Specifies if the user is a verified account. +>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8 locale: Optional[:class:`str`] The IETF language tag used to identify the language the user is using. mfa_enabled: :class:`bool` diff --git a/discord/voice_client.py b/discord/voice_client.py index d3540e0e..bca338ed 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -73,7 +73,7 @@ class VoiceProtocol: These classes are passed to :meth:`abc.Connectable.connect`. - .. _Lavalink: https://github.com/Frederikam/Lavalink + .. _Lavalink: https://github.com/freyacodes/Lavalink Parameters ------------ diff --git a/discord/webhook.py b/discord/webhook.py index dd646b33..9fb83225 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -597,7 +597,7 @@ class WebhookMessage(Message): """ if delay is not None: - if self._state.parent._adapter.is_async(): + if self._state._webhook._adapter.is_async(): return self._delete_delay_async(delay) else: return self._delete_delay_sync(delay) diff --git a/docs/_static/custom.js b/docs/_static/custom.js index f3cfa461..9d0b11dd 100644 --- a/docs/_static/custom.js +++ b/docs/_static/custom.js @@ -95,3 +95,9 @@ document.addEventListener('keydown', (event) => { activeModal.close(); } }); + +document.addEventListener('keydown', (event) => { + if (event.code == "Escape" && activeModal) { + activeModal.close(); + } +}); diff --git a/docs/_static/style.css b/docs/_static/style.css index 96d5ab0a..99c8a0aa 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -271,6 +271,12 @@ header > nav.mobile-only { header > nav.mobile-only .search { width: 100%; + position: absolute; + top: 0; + right: 0; + z-index: -1; + padding-top: 0; + transition: top 0.5s ease-in-out; } header > nav.mobile-only .search-wrapper { diff --git a/docs/api.rst b/docs/api.rst index f1bdbb76..ed6ef412 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -267,7 +267,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. If you want exception to propagate out of the :class:`Client` class you can define an ``on_error`` handler consisting of a single empty - :ref:`py:raise`. Exceptions raised by ``on_error`` will not be + :ref:`raise statement `. Exceptions raised by ``on_error`` will not be handled in any way by :class:`Client`. .. note:: @@ -834,7 +834,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. :type member: :class:`Member` :param before: The voice state prior to the changes. :type before: :class:`VoiceState` - :param after: The voice state after to the changes. + :param after: The voice state after the changes. :type after: :class:`VoiceState` .. function:: on_member_ban(guild, user) @@ -2791,6 +2791,8 @@ Role RoleTags ~~~~~~~~~~ +.. attributetable:: RoleTags + .. autoclass:: RoleTags() :members: @@ -3051,24 +3053,32 @@ AllowedMentions MessageReference ~~~~~~~~~~~~~~~~~ +.. attributetable:: MessageReference + .. autoclass:: MessageReference :members: PartialMessage ~~~~~~~~~~~~~~~~~ +.. attributetable:: PartialMessage + .. autoclass:: PartialMessage :members: Intents ~~~~~~~~~~ +.. attributetable:: Intents + .. autoclass:: Intents :members: MemberCacheFlags ~~~~~~~~~~~~~~~~~~ +.. attributetable:: MemberCacheFlags + .. autoclass:: MemberCacheFlags :members: @@ -3147,24 +3157,32 @@ PermissionOverwrite ShardInfo ~~~~~~~~~~~ +.. attributetable:: ShardInfo + .. autoclass:: ShardInfo() :members: SystemChannelFlags ~~~~~~~~~~~~~~~~~~~~ +.. attributetable:: SystemChannelFlags + .. autoclass:: SystemChannelFlags() :members: MessageFlags ~~~~~~~~~~~~ +.. attributetable:: MessageFlags + .. autoclass:: MessageFlags() :members: PublicUserFlags ~~~~~~~~~~~~~~~ +.. attributetable:: PublicUserFlags + .. autoclass:: PublicUserFlags() :members: diff --git a/docs/conf.py b/docs/conf.py index aed9086b..534499eb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -348,4 +348,4 @@ def setup(app): if app.config.language == 'ja': app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None) app.config.html_context['discord_invite'] = 'https://discord.gg/nXzj3dg' - app.config.resource_links['discord'] = 'https://discord.gg/nXzj3dg' + app.config.resource_links['discord'] = 'https://discord.gg/nXzj3dg' \ No newline at end of file diff --git a/docs/custom_features.rst b/docs/custom_features.rst new file mode 100644 index 00000000..d29a87ca --- /dev/null +++ b/docs/custom_features.rst @@ -0,0 +1,34 @@ +.. currentmodule:: discord + +.. _custom_features: + +Intro +===== +enhanced-dpy was made to add some extra features that make it just a bit easier. This custom version of discord.py will always remain up-to-date with the beta version, so not everything might work or be stable. + +Custom Features +--------------- +Here are the custom features listed that have been added to enhanced-dpy. You can refer to the changelog to see in what version they were added! + +- **Documentation URL:** https://enhanced-dpy.readthedocs.io/en/latest/index.html +- Added :attr:`Guild.bots` and :attr:`Guild.humans` +- Added :attr:`Client.owner` and :attr:`Client.owners` +- Added :meth:`Client.try_user` +- :attr:`Guild.icon_url` and :attr:`User.avatar_url` return the string in stead of Asset. use icon/avatar url_as to get the :class:`Asset` +- Merged in ext-colors (https://github.com/MGardne8/DiscordPyColours) +- Using Rapptz/discord.py/tree/neo-docs for documentation +- Added support for ``hex()`` to :class:`Color` +- Added :attr:`Client.embed_color` +- Added :meth:`Client.set_embed_color` +- Added :attr:`TextChannel.can_send` +- Added :meth:`Intents.from_list` +- Added support for ``int()`` to :class:`User`, :class:`Member`, :class:`Emoji`, :class:`Role`, :class:`Guild`, :class:`Message`, :class:`TextChannel`, :class:`VoiceChannel`, :class:`CategoryChannel`, :class:`Attachment` and :class:`Message`. This will return their id +- Added support for ``str()`` to :class:`Message`. This will return the message content +- Added :meth:`Guild.try_member` +- Added :attr:`Context.clean_prefix <.ext.commands.Context.clean_prefix>` +- Added :meth:`Colour.nitro_booster` +- Added :attr:`Permissions.admin` as alias to :attr:`Permissions.administrator` +- Added :attr:`CogMeta.aliases <.ext.commands.CogMeta.aliases>` +- Added :attr:`Bot.case_insensitive_prefix <.ext.commands.Bot.case_insensitive_prefix>` +- Added ``silent`` kwarg to :meth:`Message.delete` +- Added :meth:`Client.get_message` \ No newline at end of file diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst index f5300272..a7d7ae1f 100644 --- a/docs/ext/commands/api.rst +++ b/docs/ext/commands/api.rst @@ -176,7 +176,8 @@ Paginator Enums ------ -.. class:: discord.ext.commands.BucketType +.. class:: BucketType + :module: discord.ext.commands Specifies a type of bucket for, e.g. a cooldown. @@ -293,6 +294,9 @@ Converters .. autoclass:: discord.ext.commands.StoreChannelConverter :members: +.. autoclass:: discord.ext.commands.StageChannelConverter + :members: + .. autoclass:: discord.ext.commands.CategoryChannelConverter :members: diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst index 5e13425b..7ac3edb1 100644 --- a/docs/ext/commands/commands.rst +++ b/docs/ext/commands/commands.rst @@ -327,7 +327,7 @@ For example, a common idiom would be to have a class and a converter for that cl else: await ctx.send("Hm you're not so new.") -This can get tedious, so an inline advanced converter is possible through a ``classmethod`` inside the type: +This can get tedious, so an inline advanced converter is possible through a :func:`classmethod` inside the type: .. code-block:: python3 @@ -379,6 +379,10 @@ A lot of discord models work out of the gate as a parameter: - :class:`PartialMessage` (since v1.7) - :class:`TextChannel` - :class:`VoiceChannel` +<<<<<<< HEAD +- :class:`StageChannel` (since v1.7) +======= +>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8 - :class:`StoreChannel` (since v1.7) - :class:`CategoryChannel` - :class:`Invite` @@ -410,8 +414,15 @@ converter is given below: +--------------------------+-------------------------------------------------+ | :class:`VoiceChannel` | :class:`~ext.commands.VoiceChannelConverter` | +--------------------------+-------------------------------------------------+ +<<<<<<< HEAD +| :class:`StageChannel` | :class:`~ext.commands.StageChannelConverter` | ++--------------------------+-------------------------------------------------+ | :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` | +--------------------------+-------------------------------------------------+ +======= +| :class:`StoreChannel` | :class:`~ext.commands.StoreChannelConverter` | ++--------------------------+-------------------------------------------------+ +>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8 | :class:`CategoryChannel` | :class:`~ext.commands.CategoryChannelConverter` | +--------------------------+-------------------------------------------------+ | :class:`Invite` | :class:`~ext.commands.InviteConverter` | diff --git a/docs/ext/commands/extensions.rst b/docs/ext/commands/extensions.rst index 10e33e45..db17103d 100644 --- a/docs/ext/commands/extensions.rst +++ b/docs/ext/commands/extensions.rst @@ -27,7 +27,7 @@ An example extension looks like this: def setup(bot): bot.add_command(hello) -In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``. +In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``. .. admonition:: Cogs :class: helpful @@ -41,7 +41,7 @@ In this example we define a simple command, and when the extension is loaded thi Reloading ----------- -When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`. +When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`.Bot.reload_extension`. .. code-block:: python3 diff --git a/docs/ext/menus/index.rst b/docs/ext/menus/index.rst new file mode 100644 index 00000000..f7d07a3a --- /dev/null +++ b/docs/ext/menus/index.rst @@ -0,0 +1,31 @@ +.. _discord_ext_menus: + +``discord.ext.menus`` +==================================================== + +Something something OOOOOOHH built in paginator! + +Recipes +--------- + +Idk, some examples someday + + +.. _ext_menus_api: + +API Reference +--------------- + +.. autoclass:: discord.ext.menus.Menu() + :members: + +.. autoclass:: discord.ext.menus.PageSource() + :members: + +.. autoclass:: discord.ext.menus.MenuPages() + :members: + +.. autoclass:: discord.ext.menus.ListPageSource() + :members: + +.. autofunction:: discord.ext.tasks.menus diff --git a/docs/faq.rst b/docs/faq.rst index 643fc385..9f4185bd 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -234,7 +234,7 @@ technically in another thread, we must take caution in calling thread-safe opera us, :mod:`asyncio` comes with a :func:`asyncio.run_coroutine_threadsafe` function that allows us to call a coroutine from another thread. -However, this function returns a :class:`concurrent.Future` and to actually call it we have to fetch its result. Putting all of +However, this function returns a :class:`~concurrent.futures.Future` and to actually call it we have to fetch its result. Putting all of this together we can do the following: :: def my_after(error): @@ -295,7 +295,7 @@ How do I make a web request? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To make a request, you should use a non-blocking library. -This library already uses and requires a 3rd party library for making requests, ``aiohttp``. +This library already uses and requires a 3rd party library for making requests, :doc:`aiohttp `. Quick example: :: @@ -393,7 +393,7 @@ Example: :: How do I make a subcommand? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use the ``group`` decorator. This will transform the callback into a ``Group`` which will allow you to add commands into +Use the :func:`~ext.commands.group` decorator. This will transform the callback into a :class:`~ext.commands.Group` which will allow you to add commands into the group operating as "subcommands". These groups can be arbitrarily nested as well. Example: :: diff --git a/docs/index.rst b/docs/index.rst index a6f16c81..7837fc76 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,8 +11,17 @@ Welcome to discord.py discord.py is a modern, easy to use, feature-rich, and async ready API wrapper for Discord. +Credits to the `original lib by Rapptz `_ -**Features:** +**WARNING: This is not the official discord.py lib! This is a custom version to which I add some features that might be useful or just makes things easier for the lazy people. See below which features have been added. This lib will also be kept updated with the BETA version of the original lib! So things may be unstable, please keep that in mind.** + +Custom Features +--------------- + +**Moved to:** `Custom Features `_ + +Features +-------- - Modern Pythonic API using ``async``\/``await`` syntax - Sane rate limit handling that prevents 429s diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 8e685efa..43e34357 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -52,8 +52,9 @@ There's a lot going on here, so let's walk you through it step by step. 4. Since the :func:`on_message` event triggers for *every* message received, we have to make sure that we ignore messages from ourselves. We do this by checking if the :attr:`Message.author` is the same as the :attr:`Client.user`. -5. Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it is, - then we send a message in the channel it was used in with ``'Hello!'``. +5. Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it does, + then we send a message in the channel it was used in with ``'Hello!'``. This is a basic way of + handling commands, which can be later automated with the :ref:`ext.commands` framework. 6. Finally, we run the bot with our login token. If you need help getting your token or creating a bot, look in the :ref:`discord-intro` section. diff --git a/docs/whats_new.rst b/docs/whats_new.rst index 8100fb92..8e16ad57 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -11,6 +11,29 @@ Changelog This page keeps a detailed human friendly rendering of what's new and changed in specific versions. +.. _vp1p7p3: + +v1.7.3 +-------- + +Bug Fixes +~~~~~~~~~~ + +- Fix a crash involving guild uploaded stickers +- Fix :meth:`DMChannel.permissions_for` not having :attr:`Permissions.read_messages` set. + +.. _vp1p7p2: + +v1.7.2 +------- + +Bug Fixes +~~~~~~~~~~~ + +- Fix ``fail_if_not_exists`` causing certain message references to not be usable within :meth:`abc.Messageable.send` and :meth:`Message.reply` (:issue:`6726`) +- Fix :meth:`Guild.chunk` hanging when the user left the guild. (:issue:`6730`) +- Fix loop sleeping after final iteration rather than before (:issue:`6744`) + .. _vp1p7p1: v1.7.1 @@ -32,9 +55,10 @@ Likewise, **this is the last version to support user bots**. Development of v2.0 will have breaking changes and support for newer API features. -New Features -~~~~~~~~~~~~~~ +<<<<<<< HEAD +======= +>>>>>>> 523e35e4f3c3c49d4e471359f9fb559242bbecc8 - Add support for stage channels via :class:`StageChannel` (:issue:`6602`, :issue:`6608`) - Add support for :attr:`MessageReference.fail_if_not_exists` (:issue:`6484`) - By default, if the message you're replying to doesn't exist then the API errors out. @@ -104,6 +128,19 @@ Miscellaneous - :class:`Permission` class methods were updated to match the UI of the Discord client (:issue:`6476`) - ``_`` and ``-`` characters are now stripped when making a new cog using the ``discord`` package (:issue:`6313`) +.. _vp1p6p0p7: + +v1.6.0.7 +-------- + +New Features +~~~~~~~~~~~~~~ + +- Add :attr:`CogMeta.aliases <.ext.commands.CogMeta.aliases>` +- Add :attr:`Bot.case_insensitive_prefix <.ext.commands.Bot.case_insensitive_prefix>` +- Add ``silent`` kwargs to :meth:`Message.delete` +- Add :meth:`Client.get_message` + .. _vp1p6p0: v1.6.0 @@ -176,6 +213,49 @@ Miscellaneous - |commands| :class:`UserConverter ` now fetches the API if an ID is passed and the user is not cached. - |commands| :func:`max_concurrency ` is now called before cooldowns (:issue:`6172`) +.. _vp1p5p1p6: + +v1.5.1.6 +-------- + +New Features +~~~~~~~~~~~~~~ + +- Add :meth:`Colour.random` + +.. _vp1p5p1p5: + +v1.5.1.5 +-------- + +New Features +~~~~~~~~~~~~~~ + +- Add :meth:`Colour.nitro_booster` +- Add :attr:`Permissions.admin` as alias to :attr:`Permissions.administrator` + +New Beta Features +~~~~~~~~~~~~~~~~~~~ + +These are all for message replies. I have added them to 1.5.1.5 but they will most likely officially get added in the original lib in 1.6 or 2.0 + +- |commands| Add :meth:`Context.reply ` +- Add :meth:`Message.reply` +- Add ``replied_user`` to :class:`AllowedMentions` +- Add :meth:`MessageReference.to_dict` +- Add :meth:`MessageReference.from_message` +- Add ``message_reference`` kwarg to :meth:`abc.Messageable.send` + +.. _vp1p5p1p4: + +v1.5.1.4 +-------- + +New Features +~~~~~~~~~~~~~~ + +- |commands| Add :attr:`Context.clean_prefix ` + .. _vp1p5p1: v1.5.1 @@ -201,6 +281,52 @@ Miscellaneous - This is the same as having ``discord.Member`` as the type-hint. - :meth:`Guild.chunk` now allows concurrent calls without spamming the gateway with requests. +.. _v1p5p0p3: + +v1.5.0.3 +-------- + +Bug Fixes +~~~~~~~~~~~ + +- Fix :attr:`TextChannel.can_send` to use proper checks + +.. _vp1p5p0p2: + +v1.5.0.2 +-------- + +New Features +~~~~~~~~~~~~~~ + +- Add :attr:`Guild.try_member` +- Add :attr:`TextChannel.can_send` + +.. _vp1p5p0p1: + +v1.5.0.1 +-------- + +New Features +~~~~~~~~~~~~~~ + +- Changed :attr:`Guild.icon_url` and :attr:`User.avatar_url` to return a string of the url in stead of an :class:`Asset` +- Documentation uses `Neo Docs by Rapptz `_ +- Add 1000+ colors from `ext colors `_ +- Add support for ``hex()`` to :class:`Colour` +- Add :attr:`Guild.bots` +- Add :attr:`Guild.humans` +- |commands| Add :attr:`Bot.owner ` +- |commands| Add :attr:`Bot.owners ` +- Add :attr:`Guild.humans` +- Add :meth:`Client.try_user` +- Add :attr:`Client.embed_color` +- Add :meth:`Client.set_embed_color` +- Add :meth:`Intents.from_list` +- Add ``str()`` support to :class:`Message` which will return the :attr:`Message.content` +- Add ``int()`` support to :class:`User`, :class:`Member`, :class:`Emoji`, :class:`Role`, :class:`Guild`, :class:`Message`, :class:`TextChannel`, :class:`VoiceChannel`, :class:`CategoryChannel`, :class:`Attachment` and :class:`Message`. This will return the ID of the object + + .. _vp1p5p0: v1.5.0 diff --git a/requirements.txt b/requirements.txt index 8517fb4d..25c9da58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -aiohttp>=3.6.0,<3.8.0 +aiohttp>=3.6.0,<3.7.0 diff --git a/setup.py b/setup.py index 5a8b5524..958f9af3 100644 --- a/setup.py +++ b/setup.py @@ -42,12 +42,12 @@ extras_require = { ] } -setup(name='discord.py', - author='Rapptz', - url='https://github.com/Rapptz/discord.py', +setup(name='enhanced-dpy', + author='iDutchy', + url='https://github.com/iDutchy/discord.py', project_urls={ - "Documentation": "https://discordpy.readthedocs.io/en/latest/", - "Issue tracker": "https://github.com/Rapptz/discord.py/issues", + "Documentation": "https://enhanced-dpy.readthedocs.io/en/latest/", + "Issue tracker": "https://github.com/iDutchy/discord.py/issues", }, version=version, packages=['discord', 'discord.types', 'discord.ext.commands', 'discord.ext.tasks'],