From 969ab351b4906593505feaa43229d8bc3c95933c Mon Sep 17 00:00:00 2001 From: brad90four <42116429+brad90four@users.noreply.github.com> Date: Fri, 3 Sep 2021 16:15:34 -0400 Subject: Add colorsys import, verbage for using JSON Co-authored-by: Mohammad Rafivulla <77384412+CyberCitizen01@users.noreply.github.com> --- bot/exts/evergreen/color.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bot') diff --git a/bot/exts/evergreen/color.py b/bot/exts/evergreen/color.py index 32a25b0d..a00a956b 100644 --- a/bot/exts/evergreen/color.py +++ b/bot/exts/evergreen/color.py @@ -1,6 +1,7 @@ # imports import logging +import colorsys import pillow from discord import Embed # ! need to install discord-flags and add to poetry.lock file @@ -13,8 +14,8 @@ from bot.constants import Colours logger = logging.getLogger(__name__) # constants if needed -# TODO Will the color conversions be done only from pillow or will an API / URL be needed? -# Color URLs +# Color URLs - will be replaced by JSON file? +COLOR_JSON_PATH = ".bot//exts//resources//evergreen//" COLOR_URL_XKCD = "https://xkcd.com/color/rgb/" COLOR_URL_NAME_THAT_COLOR = "https://github.com/ryanzec/name-that-color/blob/master/lib/ntc.js#L116-L1681" @@ -78,7 +79,7 @@ class Color(commands.cog): # HSL=color_dict["HSL"], # Hex=color_dict["Hex"], # color_name=color_dict["color_name"] - # ) + # ).set_image() # url for image? # ) # TODO pass for now -- cgit v1.2.3