Repository: interactions-py/interactions.py

Issue:
[REQUEST] Add a basic `Color` object.
### Describe the feature.

People may want to be able to easily call upon colors. Since it should be at least an accepted concept, I am wanting to add a basic `Color` object that includes the official branding colors. Please note that other colors that are custom-defined are ideally frowned on for this idea since the core library is about making implementations strict to what Discord offer, which we can argue debatably with the branding colors.

### Code of Conduct

- [X] I agree to follow the contribution requirements.


Discussion:

Resolving patch:
diff --git a/interactions/api/models/misc.py b/interactions/api/models/misc.py
--- a/interactions/api/models/misc.py
+++ b/interactions/api/models/misc.py
@@ -171,54 +171,55 @@ def __hash__(self):
     # but end users might.
 
 
-class Format:
+class Color(object):
     """
-    This object is used to respectively format markdown strings
-    provided by the WYSIWYG text editor for ease-of-accessibility
-    and simple implementations into bots.
+    An object representing Discord branding colors.
 
     .. note::
-        All base strings are given brackets before being f-string
-        parsable to make conversion simplified.
-
-    .. warning::
-        the ``stylize()`` method must be used if you're actually
-        looking to give a **str** specific result.
+        This object only intends to cover the branding colors
+        and no others. The main reason behind this is due to
+        the current accepted standard of using hex codes or other
+        custom-defined colors.
     """
 
-    USER = "<@%s>"
-    USER_NICK = "<@!%s>"
-    CHANNEL = "<#%s>"
-    ROLE = "<@&%s>"
-    EMOJI = "<:%s:%d>"
-    EMOJI_ANIMATED = "<a:%s:%d>"
-    TIMESTAMP = "<t:%s>"
-    TIMESTAMP_SHORT_T = "<t:%s:t>"
-    TIMESTAMP_LONG_T = "<t:%s:T>"
-    TIMESTAMP_SHORT_D = "<t:%s:d>"
-    TIMESTAMP_LONG_D = "<t:%s:D>"
-    TIMESTAMP_SHORT_DT = TIMESTAMP
-    TIMESTAMP_LONG_DT = "<t:%s:F>"
-    TIMESTAMP_RELATIVE = "<t:%s:R>"
-
-    @classmethod
-    def stylize(cls, format: str, **kwargs) -> str:
-        r"""
-        This takes a format style from the object and
-        converts it into a usable string for ease.
-
-        :param format: The format string to use.
-        :type format: str
-        :param \**kwargs: Multiple key-word arguments to use, where key=value is format=value.
-        :type \**kwargs: dict
-        :return: The formatted string.
-        :rtype: str
-        """
-        new: str = f""  # noqa: F541
-        for kwarg in kwargs:
-            if format == kwarg:
-                new %= format
-        return new
+    @property
+    def blurple(self) -> hex:
+        """Returns a hexadecimal value of the blurple color."""
+        return 0x5865F2
+
+    @property
+    def green(self) -> hex:
+        """Returns a hexadecimal value of the green color."""
+        return 0x57F287
+
+    @property
+    def yellow(self) -> hex:
+        """Returns a hexadecimal value of the yellow color."""
+        return 0xFEE75C
+
+    @property
+    def fuchsia(self) -> hex:
+        """Returns a hexadecimal value of the fuchsia color."""
+        return 0xEB459E
+
+    @property
+    def red(self) -> hex:
+        """Returns a hexadecimal value of the red color."""
+        return 0xED4245
+
+    # I can't imagine any bot developers actually using these.
+    # If they don't know white is ff and black is 00, something's seriously
+    # wrong.
+
+    @property
+    def white(self) -> hex:
+        """Returns a hexadecimal value of the white color."""
+        return 0xFFFFFF
+
+    @property
+    def black(self) -> hex:
+        """Returns a hexadecimal value of the black color."""
+        return 0x000000
 
 
 class MISSING:


Test patch: