"""Color enumerations."""
from enum import Enum, auto


class Color16(Enum):
    """Type representing colors from the 16 colors color set."""
    BLACK = auto()
    RED = auto()
    GREEN = auto()
    YELLOW = auto()
    BLUE = auto()
    MAGENTA = auto()
    CYAN = auto()
    WHITE = auto()
    BRIGHT_BLACK = auto()
    BRIGHT_RED = auto()
    BRIGHT_GREEN = auto()
    BRIGHT_YELLOW = auto()
    BRIGHT_BLUE = auto()
    BRIGHT_MAGENTA = auto()
    BRIGHT_CYAN = auto()
    BRIGHT_WHITE = auto()
    DEFAULT = auto()


class Color256(str, Enum):
    """Type mapping 256 set color indexes to their RGB value."""
    COLOR0 = "000000"
    COLOR1 = "cd0000"
    COLOR2 = "00cd00"
    COLOR3 = "cdcd00"
    COLOR4 = "0000ee"
    COLOR5 = "cd00cd"
    COLOR6 = "00cdcd"
    COLOR7 = "e5e5e5"
    COLOR8 = "7f7f7f"
    COLOR9 = "ff0000"
    COLOR10 = "00ff00"
    COLOR11 = "ffff00"
    COLOR12 = "5c5cff"
    COLOR13 = "ff00ff"
    COLOR14 = "00ffff"
    COLOR15 = "ffffff"
    COLOR16 = "000000"
    COLOR17 = "00005f"
    COLOR18 = "000087"
    COLOR19 = "0000af"
    COLOR20 = "0000d7"
    COLOR21 = "0000ff"
    COLOR22 = "005f00"
    COLOR23 = "005f5f"
    COLOR24 = "005f87"
    COLOR25 = "005faf"
    COLOR26 = "005fd7"
    COLOR27 = "005fff"
    COLOR28 = "008700"
    COLOR29 = "00875f"
    COLOR30 = "008787"
    COLOR31 = "0087af"
    COLOR32 = "0087d7"
    COLOR33 = "0087ff"
    COLOR34 = "00af00"
    COLOR35 = "00af5f"
    COLOR36 = "00af87"
    COLOR37 = "00afaf"
    COLOR38 = "00afd7"
    COLOR39 = "00afff"
    COLOR40 = "00d700"
    COLOR41 = "00d75f"
    COLOR42 = "00d787"
    COLOR43 = "00d7af"
    COLOR44 = "00d7d7"
    COLOR45 = "00d7ff"
    COLOR46 = "00ff00"
    COLOR47 = "00ff5f"
    COLOR48 = "00ff87"
    COLOR49 = "00ffaf"
    COLOR50 = "00ffd7"
    COLOR51 = "00ffff"
    COLOR52 = "5f0000"
    COLOR53 = "5f005f"
    COLOR54 = "5f0087"
    COLOR55 = "5f00af"
    COLOR56 = "5f00d7"
    COLOR57 = "5f00ff"
    COLOR58 = "5f5f00"
    COLOR59 = "5f5f5f"
    COLOR60 = "5f5f87"
    COLOR61 = "5f5faf"
    COLOR62 = "5f5fd7"
    COLOR63 = "5f5fff"
    COLOR64 = "5f8700"
    COLOR65 = "5f875f"
    COLOR66 = "5f8787"
    COLOR67 = "5f87af"
    COLOR68 = "5f87d7"
    COLOR69 = "5f87ff"
    COLOR70 = "5faf00"
    COLOR71 = "5faf5f"
    COLOR72 = "5faf87"
    COLOR73 = "5fafaf"
    COLOR74 = "5fafd7"
    COLOR75 = "5fafff"
    COLOR76 = "5fd700"
    COLOR77 = "5fd75f"
    COLOR78 = "5fd787"
    COLOR79 = "5fd7af"
    COLOR80 = "5fd7d7"
    COLOR81 = "5fd7ff"
    COLOR82 = "5fff00"
    COLOR83 = "5fff5f"
    COLOR84 = "5fff87"
    COLOR85 = "5fffaf"
    COLOR86 = "5fffd7"
    COLOR87 = "5fffff"
    COLOR88 = "870000"
    COLOR89 = "87005f"
    COLOR90 = "870087"
    COLOR91 = "8700af"
    COLOR92 = "8700d7"
    COLOR93 = "8700ff"
    COLOR94 = "875f00"
    COLOR95 = "875f5f"
    COLOR96 = "875f87"
    COLOR97 = "875faf"
    COLOR98 = "875fd7"
    COLOR99 = "875fff"
    COLOR100 = "878700"
    COLOR101 = "87875f"
    COLOR102 = "878787"
    COLOR103 = "8787af"
    COLOR104 = "8787d7"
    COLOR105 = "8787ff"
    COLOR106 = "87af00"
    COLOR107 = "87af5f"
    COLOR108 = "87af87"
    COLOR109 = "87afaf"
    COLOR110 = "87afd7"
    COLOR111 = "87afff"
    COLOR112 = "87d700"
    COLOR113 = "87d75f"
    COLOR114 = "87d787"
    COLOR115 = "87d7af"
    COLOR116 = "87d7d7"
    COLOR117 = "87d7ff"
    COLOR118 = "87ff00"
    COLOR119 = "87ff5f"
    COLOR120 = "87ff87"
    COLOR121 = "87ffaf"
    COLOR122 = "87ffd7"
    COLOR123 = "87ffff"
    COLOR124 = "af0000"
    COLOR125 = "af005f"
    COLOR126 = "af0087"
    COLOR127 = "af00af"
    COLOR128 = "af00d7"
    COLOR129 = "af00ff"
    COLOR130 = "af5f00"
    COLOR131 = "af5f5f"
    COLOR132 = "af5f87"
    COLOR133 = "af5faf"
    COLOR134 = "af5fd7"
    COLOR135 = "af5fff"
    COLOR136 = "af8700"
    COLOR137 = "af875f"
    COLOR138 = "af8787"
    COLOR139 = "af87af"
    COLOR140 = "af87d7"
    COLOR141 = "af87ff"
    COLOR142 = "afaf00"
    COLOR143 = "afaf5f"
    COLOR144 = "afaf87"
    COLOR145 = "afafaf"
    COLOR146 = "afafd7"
    COLOR147 = "afafff"
    COLOR148 = "afd700"
    COLOR149 = "afd75f"
    COLOR150 = "afd787"
    COLOR151 = "afd7af"
    COLOR152 = "afd7d7"
    COLOR153 = "afd7ff"
    COLOR154 = "afff00"
    COLOR155 = "afff5f"
    COLOR156 = "afff87"
    COLOR157 = "afffaf"
    COLOR158 = "afffd7"
    COLOR159 = "afffff"
    COLOR160 = "d70000"
    COLOR161 = "d7005f"
    COLOR162 = "d70087"
    COLOR163 = "d700af"
    COLOR164 = "d700d7"
    COLOR165 = "d700ff"
    COLOR166 = "d75f00"
    COLOR167 = "d75f5f"
    COLOR168 = "d75f87"
    COLOR169 = "d75faf"
    COLOR170 = "d75fd7"
    COLOR171 = "d75fff"
    COLOR172 = "d78700"
    COLOR173 = "d7875f"
    COLOR174 = "d78787"
    COLOR175 = "d787af"
    COLOR176 = "d787d7"
    COLOR177 = "d787ff"
    COLOR178 = "d7af00"
    COLOR179 = "d7af5f"
    COLOR180 = "d7af87"
    COLOR181 = "d7afaf"
    COLOR182 = "d7afd7"
    COLOR183 = "d7afff"
    COLOR184 = "d7d700"
    COLOR185 = "d7d75f"
    COLOR186 = "d7d787"
    COLOR187 = "d7d7af"
    COLOR188 = "d7d7d7"
    COLOR189 = "d7d7ff"
    COLOR190 = "d7ff00"
    COLOR191 = "d7ff5f"
    COLOR192 = "d7ff87"
    COLOR193 = "d7ffaf"
    COLOR194 = "d7ffd7"
    COLOR195 = "d7ffff"
    COLOR196 = "ff0000"
    COLOR197 = "ff005f"
    COLOR198 = "ff0087"
    COLOR199 = "ff00af"
    COLOR200 = "ff00d7"
    COLOR201 = "ff00ff"
    COLOR202 = "ff5f00"
    COLOR203 = "ff5f5f"
    COLOR204 = "ff5f87"
    COLOR205 = "ff5faf"
    COLOR206 = "ff5fd7"
    COLOR207 = "ff5fff"
    COLOR208 = "ff8700"
    COLOR209 = "ff875f"
    COLOR210 = "ff8787"
    COLOR211 = "ff87af"
    COLOR212 = "ff87d7"
    COLOR213 = "ff87ff"
    COLOR214 = "ffaf00"
    COLOR215 = "ffaf5f"
    COLOR216 = "ffaf87"
    COLOR217 = "ffafaf"
    COLOR218 = "ffafd7"
    COLOR219 = "ffafff"
    COLOR220 = "ffd700"
    COLOR221 = "ffd75f"
    COLOR222 = "ffd787"
    COLOR223 = "ffd7af"
    COLOR224 = "ffd7d7"
    COLOR225 = "ffd7ff"
    COLOR226 = "ffff00"
    COLOR227 = "ffff5f"
    COLOR228 = "ffff87"
    COLOR229 = "ffffaf"
    COLOR230 = "ffffd7"
    COLOR231 = "ffffff"
    COLOR232 = "080808"
    COLOR233 = "121212"
    COLOR234 = "1c1c1c"
    COLOR235 = "262626"
    COLOR236 = "303030"
    COLOR237 = "3a3a3a"
    COLOR238 = "444444"
    COLOR239 = "4e4e4e"
    COLOR240 = "585858"
    COLOR241 = "626262"
    COLOR242 = "6c6c6c"
    COLOR243 = "767676"
    COLOR244 = "808080"
    COLOR245 = "8a8a8a"
    COLOR246 = "949494"
    COLOR247 = "9e9e9e"
    COLOR248 = "a8a8a8"
    COLOR249 = "b2b2b2"
    COLOR250 = "bcbcbc"
    COLOR251 = "c6c6c6"
    COLOR252 = "d0d0d0"
    COLOR253 = "dadada"
    COLOR254 = "e4e4e4"
    COLOR255 = "eeeeee"
