<?php
/**
 * Represents a color code with a sort of helpful methods.
 *
 * Provides a programmatically generated, human-readable
 * name for the color such as #FFF => 'White'
 *
 * Partially implements the flow in this good SO answer:
 *
 * @see http://stackoverflow.com/a/2994015/199593
 *
 * @author  M. Yilmaz SUSLU <yilmazsuslu@gmail.com>
 * @license MIT
 *
 * @since   Oct 2016
 */

namespace DDD\Embeddable;

use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use JsonSerializable;
use function preg_match;

/**
 * @ORM\Embeddable
 */
class Color implements JsonSerializable
{
    /**
     * persistable, hexadecimal representation of the color
     *
     * Persisted hex value is always upper-cased and doesn't contain a '#' prefix.
     *
     * @ORM\Column(type="string", length=6, nullable=true)
     */
    private ?string $color = null;

    public function __construct(?string $hex = null)
    {
        if (! $hex) {
            return;
        }

        $hex = $this->normalize($hex);

        if (! $this->isValidHex($hex)) {
            throw new InvalidArgumentException(sprintf('Given hex value %s is invalid', $hex));
        }

        $this->color = $hex;
    }

    /**
     * Returns the color in hexadecimal format
     */
    public function toHex() : string
    {
        return ($this->color) ? '#' . $this->color : '';
    }

    /**
     * Returns the color in RGB format, empty array if color is not set.
     */
    public function toRGB() : array
    {
        if ($this->isEmpty()) {
            return [];
        }

        [$r, $g, $b] = sscanf($this->color, "%02x%02x%02x");

        return [$r, $g, $b];
    }

    /**
     * Returns the color as RGB string
     *
     * Example: "rgb(60,60,240)"
     */
    public function toRGBString() : string
    {
        $rgb = $this->toRGB();

        return 'rgb(' . implode(',', $rgb) . ')';
    }

    /**
     * Returns programmatically generated, the nearest name for the color.
     *
     * Note: This method is pretty slow even for a single call because
     * iterates all over the color name => [r,g,b] stack below to find
     * the nearest color in whole haystack, this means approx. ~3500 iteration.
     *
     * Caching a serialized version of this object is highly recommended.
     *
     * @todo There may faster algorithms exists to achieve same thing.
     */
    public function getName() : string
    {
        return $this->generateName($this->toRGB());
    }

    /**
     * Array representation of the color
     */
    public function toArray() : array
    {
        if ($this->isEmpty()) {
            return [];
        }

        $rgb = $this->toRGB();

        return [
            'hex' => $this->toHex(),
            'rgb' => $rgb,
            'name' => $this->getName(),
        ];
    }

    /**
     * Implement json serializable interface.
     */
    public function jsonSerialize() : array
    {
        return $this->toArray();
    }

    /**
     * Creates a new Color instance from r,g,b values.
     */
    public static function fromRGB(int $r, int $g, int $b) : Color
    {
        $hex = dechex($r) . dechex($g) . dechex($b);

        return new self($hex);
    }

    /**
     * String representation of the color, an upper-cased hex value.
     *
     * @return string Example: #FFCC60
     */
    public function __toString()
    {
        return $this->toHex();
    }

    /**
     * Returns a boolean TRUE if color is literally empty
     */
    public function isEmpty() : bool
    {
        return empty($this->color);
    }

    /**
     * Returns distance between two colors.
     *
     * @see https://stackoverflow.com/questions/4057475/rounding-colours
     * @param array $color2 RGB color
     *
     * @param array $color1 RGB color
     */
    private function distanceL2(array $color1, array $color2) : float
    {
        return sqrt(
            (($color1[0] - $color2[0]) ** 2) +
            (($color1[1] - $color2[1]) ** 2) +
            (($color1[2] - $color2[2]) ** 2)
        );
    }

    /**
     * Generates a proper name for given RGB color.
     */
    private function generateName(array $rgb) : string
    {
        $distances = [];
        foreach ($this->getColorNames() as $name => $rgbValue) {
            $distances[$name] = $this->distanceL2($rgbValue, $rgb);
        }

        $minColor = '';
        $minVal   = 2 ** 30;
        /** A big value */

        foreach ($distances as $k => $v) {
            if ($v < $minVal) {
                $minVal   = $v;
                $minColor = $k;
            }
        }

        // Closest color name to given RGB code
        return $minColor;
    }

    /**
     * Validates given hex color code, returns a boolean TRUE if it is valid.
     *
     * @param string $hex Three or six digit HEX code like #FFAC43, #000
     */
    private function isValidHex(string $hex) : bool
    {
        // Allow both #FFF and #FFFFFF conventions
        return preg_match('/^[A-F0-9]{6}$/', $hex) || preg_match('/^[A-F0-9]{3}$/', $hex);
    }

    /**
     * Filters and normalizes given hexadecimal color code.
     *
     * @param string $hex An unfiltered hex value.
     */
    private function normalize(string $hex) : string
    {
        // Get rid of first # sign if it exists
        if ($hex[0] === '#') {
            $hex = substr($hex, 1);
        }

        if (strlen($hex) === 3) {
            // Convert to 6 digit version
            $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
        }

        return strtoupper($hex);
    }

    /**
     * Returns a (pretty big) static list of well-known color names
     * with their RGB codes.
     *
     * Including, caching or requiring these values from an external
     * resource is always possible, but it would be costlier than this.
     *
     * Since all PHP classes cached by Opcache in runtime, this will
     * run pretty fast on a production box. As a drawback, instance size of Color
     * in memory will be higher (in kilobytes). There is no free lunch.
     *
     * For a simple entity which needs just a "color" property (such as Product),
     * this value object may fit perfectly.
     */
    private function getColorNames() : array
    {
        return [
            'Acid Green' => [176, 191, 26],
            'Aero Blue' => [201, 255, 229],
            'Aero' => [124, 185, 232],
            'African Violet' => [178, 132, 190],
            'Air Force Blue (RAF)' => [93, 138, 168],
            'Air Force Blue (USAF)' => [0, 48, 143],
            'Air Superiority Blue' => [114, 160, 193],
            'Alabama Crimson' => [175, 0, 42],
            'Alice Blue' => [240, 248, 255],
            'Alizarin Crimson' => [227, 38, 54],
            'Alloy Orange' => [196, 98, 16],
            'Almond' => [239, 222, 205],
            'Amaranth Deep Purple' => [171, 39, 79],
            'Amaranth Pink' => [241, 156, 187],
            'Amaranth Purple' => [171, 39, 79],
            'Amaranth Red' => [211, 33, 45],
            'Amaranth' => [229, 43, 80],
            'Amazon' => [59, 122, 87],
            'Amber (SAE/ECE)' => [255, 126, 0],
            'Amber' => [255, 191, 0],
            'American Rose' => [255, 3, 62],
            'Amethyst' => [153, 102, 204],
            'Android Green' => [164, 198, 57],
            'Anti-Flash White' => [242, 243, 244],
            'Antique Brass' => [205, 149, 117],
            'Antique Bronze' => [102, 93, 30],
            'Antique Fuchsia' => [145, 92, 131],
            'Antique Ruby' => [132, 27, 45],
            'Antique White' => [250, 235, 215],
            'Ao (English)' => [0, 128, 0],
            'Apple Green' => [141, 182, 0],
            'Apricot' => [251, 206, 177],
            'Aqua' => [0, 255, 255],
            'Aquamarine' => [127, 255, 212],
            'Arctic Lime' => [208, 255, 20],
            'Army Green' => [75, 83, 32],
            'Arsenic' => [59, 68, 75],
            'Artichoke' => [143, 151, 121],
            'Arylide Yellow' => [233, 214, 107],
            'Ash Grey' => [178, 190, 181],
            'Asparagus' => [135, 169, 107],
            'Atomic Tangerine' => [255, 153, 102],
            'Auburn' => [165, 42, 42],
            'Aureolin' => [253, 238, 0],
            'Auro Metal Saurus' => [110, 127, 128],
            'Avocado' => [86, 130, 3],
            'Azure (Web Color)' => [240, 255, 255],
            'Azure Mist' => [240, 255, 255],
            'Azure' => [0, 127, 255],
            'Azureish White' => [219, 233, 244],
            "B'dazzled Blue" => [46, 88, 148],
            'Baby Blue Eyes' => [161, 202, 241],
            'Baby Blue' => [137, 207, 240],
            'Baby Pink' => [244, 194, 194],
            'Baby Powder' => [254, 254, 250],
            'Baker-Miller Pink' => [255, 145, 175],
            'Ball Blue' => [33, 171, 205],
            'Banana Mania' => [250, 231, 181],
            'Banana Yellow' => [255, 225, 53],
            'Bangladesh Green' => [0, 106, 78],
            'Barbie Pink' => [224, 33, 138],
            'Barn Red' => [124, 10, 2],
            'Battleship Grey' => [132, 132, 130],
            'Bazaar' => [152, 119, 123],
            'Beau Blue' => [188, 212, 230],
            'Beaver' => [159, 129, 112],
            'Beige' => [245, 245, 220],
            'Big Dip O’ruby' => [156, 37, 66],
            'Bisque' => [255, 228, 196],
            'Bistre Brown' => [150, 113, 23],
            'Bistre' => [61, 43, 31],
            'Bitter Lemon' => [202, 224, 13],
            'Bitter Lime' => [191, 255, 0],
            'Bittersweet Shimmer' => [191, 79, 81],
            'Bittersweet' => [254, 111, 94],
            'Black Bean' => [61, 12, 2],
            'Black Leather Jacket' => [37, 53, 41],
            'Black Olive' => [59, 60, 54],
            'Black' => [0, 0, 0],
            'Blanched Almond' => [255, 235, 205],
            'Blast-Off Bronze' => [165, 113, 100],
            'Bleu De France' => [49, 140, 231],
            'Blizzard Blue' => [172, 229, 238],
            'Blond' => [250, 240, 190],
            'Blue (Crayola)' => [31, 117, 254],
            'Blue (Munsell)' => [0, 147, 175],
            'Blue (NCS)' => [0, 135, 189],
            'Blue (Pantone)' => [0, 24, 168],
            'Blue (Pigment)' => [51, 51, 153],
            'Blue (RYB)' => [2, 71, 254],
            'Blue Bell' => [162, 162, 208],
            'Blue Lagoon' => [172, 229, 238],
            'Blue Sapphire' => [18, 97, 128],
            'Blue Yonder' => [80, 114, 167],
            'Blue' => [0, 0, 255],
            'Blue-Gray' => [102, 153, 204],
            'Blue-Green' => [13, 152, 186],
            'Blue-Magenta Violet' => [85, 53, 146],
            'Blue-Violet' => [138, 43, 226],
            'Blueberry' => [79, 134, 247],
            'Bluebonnet' => [28, 28, 240],
            'Blush' => [222, 93, 131],
            'Bole' => [121, 68, 59],
            'Bondi Blue' => [0, 149, 182],
            'Bone' => [227, 218, 201],
            'Boston University Red' => [204, 0, 0],
            'Bottle Green' => [0, 106, 78],
            'Boysenberry' => [135, 50, 96],
            'Brandeis Blue' => [0, 112, 255],
            'Brass' => [181, 166, 66],
            'Brick Red' => [203, 65, 84],
            'Bright Cerulean' => [29, 172, 214],
            'Bright Green' => [102, 255, 0],
            'Bright Lavender' => [191, 148, 228],
            'Bright Lilac' => [216, 145, 239],
            'Bright Maroon' => [195, 33, 72],
            'Bright Navy Blue' => [25, 116, 210],
            'Bright Pink' => [255, 0, 127],
            'Bright Turquoise' => [8, 232, 222],
            'Bright Ube' => [209, 159, 232],
            'Brilliant Azure' => [51, 153, 255],
            'Brilliant Lavender' => [244, 187, 255],
            'Brilliant Rose' => [255, 85, 163],
            'Brink Pink' => [251, 96, 127],
            'British Racing Green' => [0, 66, 37],
            'Bronze Yellow' => [115, 112, 0],
            'Bronze' => [205, 127, 50],
            'Brown (Traditional)' => [150, 75, 0],
            'Brown (Web)' => [165, 42, 42],
            'Brown Yellow' => [204, 153, 102],
            'Brown-Nose' => [107, 68, 35],
            'Brunswick Green' => [27, 77, 62],
            'Bubble Gum' => [255, 193, 204],
            'Bubbles' => [231, 254, 255],
            'Bud Green' => [123, 182, 97],
            'Buff' => [240, 220, 130],
            'Bulgarian Rose' => [72, 6, 7],
            'Burgundy' => [128, 0, 32],
            'Burlywood' => [222, 184, 135],
            'Burnt Orange' => [204, 85, 0],
            'Burnt Sienna' => [233, 116, 81],
            'Burnt Umber' => [138, 51, 36],
            'Byzantine' => [189, 51, 164],
            'Byzantium' => [112, 41, 99],
            'Cadet Blue' => [95, 158, 160],
            'Cadet Grey' => [145, 163, 176],
            'Cadet' => [83, 104, 114],
            'Cadmium Green' => [0, 107, 60],
            'Cadmium Orange' => [237, 135, 45],
            'Cadmium Red' => [227, 0, 34],
            'Cadmium Yellow' => [255, 246, 0],
            'Café Au Lait' => [166, 123, 91],
            'Café Noir' => [75, 54, 33],
            'Cal Poly Green' => [30, 77, 43],
            'Cambridge Blue' => [163, 193, 173],
            'Camel' => [193, 154, 107],
            'Cameo Pink' => [239, 187, 204],
            'Camouflage Green' => [120, 134, 107],
            'Canary Yellow' => [255, 239, 0],
            'Candy Apple Red' => [255, 8, 0],
            'Candy Pink' => [228, 113, 122],
            'Capri' => [0, 191, 255],
            'Caput Mortuum' => [89, 39, 32],
            'Cardinal' => [196, 30, 58],
            'Caribbean Green' => [0, 204, 153],
            'Carmine (M&P)' => [215, 0, 64],
            'Carmine Pink' => [235, 76, 66],
            'Carmine Red' => [255, 0, 56],
            'Carmine' => [150, 0, 24],
            'Carnation Pink' => [255, 166, 201],
            'Carnelian' => [179, 27, 27],
            'Carolina Blue' => [86, 160, 211],
            'Carrot Orange' => [237, 145, 33],
            'Castleton Green' => [0, 86, 63],
            'Catalina Blue' => [6, 42, 120],
            'Catawba' => [112, 54, 66],
            'Cedar Chest' => [201, 90, 73],
            'Ceil' => [146, 161, 207],
            'Celadon Blue' => [0, 123, 167],
            'Celadon Green' => [47, 132, 124],
            'Celadon' => [172, 225, 175],
            'Celeste' => [178, 255, 255],
            'Celestial Blue' => [73, 151, 208],
            'Cerise Pink' => [236, 59, 131],
            'Cerise' => [222, 49, 99],
            'Cerulean Blue' => [42, 82, 190],
            'Cerulean Frost' => [109, 155, 195],
            'Cerulean' => [0, 123, 167],
            'CG Blue' => [0, 122, 165],
            'CG Red' => [224, 60, 49],
            'Chamoisee' => [160, 120, 90],
            'Champagne' => [247, 231, 206],
            'Charcoal' => [54, 69, 79],
            'Charleston Green' => [35, 43, 43],
            'Charm Pink' => [230, 143, 172],
            'Chartreuse (Traditional)' => [223, 255, 0],
            'Chartreuse (Web)' => [127, 255, 0],
            'Cherry Blossom Pink' => [255, 183, 197],
            'Cherry' => [222, 49, 99],
            'Chestnut' => [149, 69, 53],
            'China Pink' => [222, 111, 161],
            'China Rose' => [168, 81, 110],
            'Chinese Red' => [170, 56, 30],
            'Chinese Violet' => [133, 96, 136],
            'Chocolate (Traditional)' => [123, 63, 0],
            'Chocolate (Web)' => [210, 105, 30],
            'Chrome Yellow' => [255, 167, 0],
            'Cinereous' => [152, 129, 123],
            'Cinnabar' => [227, 66, 52],
            'Cinnamon' => [210, 105, 30],
            'Citrine' => [228, 208, 10],
            'Citron' => [159, 169, 31],
            'Claret' => [127, 23, 52],
            'Classic Rose' => [251, 204, 231],
            'Cobalt Blue' => [0, 71, 171],
            'Cocoa Brown' => [210, 105, 30],
            'Coconut' => [150, 90, 62],
            'Coffee' => [111, 78, 55],
            'Columbia Blue' => [196, 216, 226],
            'Congo Pink' => [248, 131, 121],
            'Cool Black' => [0, 46, 99],
            'Cool Grey' => [140, 146, 172],
            'Copper (Crayola)' => [218, 138, 103],
            'Copper Penny' => [173, 111, 105],
            'Copper Red' => [203, 109, 81],
            'Copper Rose' => [153, 102, 102],
            'Copper' => [184, 115, 51],
            'Coquelicot' => [255, 56, 0],
            'Coral Pink' => [248, 131, 121],
            'Coral Red' => [255, 64, 64],
            'Coral' => [255, 127, 80],
            'Cordovan' => [137, 63, 69],
            'Corn' => [251, 236, 93],
            'Cornell Red' => [179, 27, 27],
            'Cornflower Blue' => [100, 149, 237],
            'Cornsilk' => [255, 248, 220],
            'Cosmic Latte' => [255, 248, 231],
            'Cotton Candy' => [255, 188, 217],
            'Coyote Brown' => [129, 97, 62],
            'Cream' => [255, 253, 208],
            'Crimson Glory' => [190, 0, 50],
            'Crimson Red' => [153, 0, 0],
            'Crimson' => [220, 20, 60],
            'Cyan (Process)' => [0, 183, 235],
            'Cyan Azure' => [78, 130, 180],
            'Cyan Cobalt Blue' => [40, 88, 156],
            'Cyan Cornflower Blue' => [24, 139, 194],
            'Cyan' => [0, 255, 255],
            'Cyan-Blue Azure' => [70, 130, 191],
            'Cyber Grape' => [88, 66, 124],
            'Cyber Yellow' => [255, 211, 0],
            'Daffodil' => [255, 255, 49],
            'Dandelion' => [240, 225, 48],
            'Dark Blue' => [0, 0, 139],
            'Dark Blue-Gray' => [102, 102, 153],
            'Dark Brown' => [101, 67, 33],
            'Dark Brown-Tangelo' => [136, 101, 78],
            'Dark Byzantium' => [93, 57, 84],
            'Dark Candy Apple Red' => [164, 0, 0],
            'Dark Cerulean' => [8, 69, 126],
            'Dark Chestnut' => [152, 105, 96],
            'Dark Coral' => [205, 91, 69],
            'Dark Cyan' => [0, 139, 139],
            'Dark Electric Blue' => [83, 104, 120],
            'Dark Goldenrod' => [184, 134, 11],
            'Dark Gray (X11)' => [169, 169, 169],
            'Dark Green (X11)' => [0, 100, 0],
            'Dark Green' => [1, 50, 32],
            'Dark Gunmetal' => [0, 100, 0],
            'Dark Imperial Blue' => [110, 110, 249],
            'Dark Jungle Green' => [26, 36, 33],
            'Dark Khaki' => [189, 183, 107],
            'Dark Lava' => [72, 60, 50],
            'Dark Lavender' => [115, 79, 150],
            'Dark Liver (Horses)' => [84, 61, 55],
            'Dark Liver' => [83, 75, 79],
            'Dark Magenta' => [139, 0, 139],
            'Dark Medium Gray' => [169, 169, 169],
            'Dark Midnight Blue' => [0, 51, 102],
            'Dark Moss Green' => [74, 93, 35],
            'Dark Olive Green' => [85, 107, 47],
            'Dark Orange' => [255, 140, 0],
            'Dark Orchid' => [153, 50, 204],
            'Dark Pastel Blue' => [119, 158, 203],
            'Dark Pastel Green' => [3, 192, 60],
            'Dark Pastel Purple' => [150, 111, 214],
            'Dark Pastel Red' => [194, 59, 34],
            'Dark Pink' => [231, 84, 128],
            'Dark Powder Blue' => [0, 51, 153],
            'Dark Puce' => [79, 58, 60],
            'Dark Purple' => [48, 25, 52],
            'Dark Raspberry' => [135, 38, 87],
            'Dark Red' => [139, 0, 0],
            'Dark Salmon' => [233, 150, 122],
            'Dark Scarlet' => [86, 3, 25],
            'Dark Sea Green' => [143, 188, 143],
            'Dark Sienna' => [60, 20, 20],
            'Dark Sky Blue' => [140, 190, 214],
            'Dark Slate Blue' => [72, 61, 139],
            'Dark Slate Gray' => [47, 79, 79],
            'Dark Spring Green' => [23, 114, 69],
            'Dark Tan' => [145, 129, 81],
            'Dark Tangerine' => [255, 168, 18],
            'Dark Taupe' => [72, 60, 50],
            'Dark Terra Cotta' => [204, 78, 92],
            'Dark Turquoise' => [0, 206, 209],
            'Dark Vanilla' => [209, 190, 168],
            'Dark Violet' => [148, 0, 211],
            'Dark Yellow' => [155, 135, 12],
            'Dartmouth Green' => [0, 112, 60],
            'Davy\'s Grey' => [85, 85, 85],
            'Debian Red' => [215, 10, 83],
            'Deep Aquamarine' => [64, 130, 109],
            'Deep Carmine Pink' => [239, 48, 56],
            'Deep Carmine' => [169, 32, 62],
            'Deep Carrot Orange' => [233, 105, 44],
            'Deep Cerise' => [218, 50, 135],
            'Deep Champagne' => [250, 214, 165],
            'Deep Chestnut' => [185, 78, 72],
            'Deep Coffee' => [112, 66, 65],
            'Deep Fuchsia' => [193, 84, 193],
            'Deep Green' => [5, 102, 8],
            'Deep Green-Cyan Turquoise' => [14, 124, 97],
            'Deep Jungle Green' => [0, 75, 73],
            'Deep Koamaru' => [51, 51, 102],
            'Deep Lemon' => [245, 199, 26],
            'Deep Lilac' => [153, 85, 187],
            'Deep Magenta' => [204, 0, 204],
            'Deep Maroon' => [130, 0, 0],
            'Deep Mauve' => [212, 115, 212],
            'Deep Moss Green' => [53, 94, 59],
            'Deep Peach' => [255, 203, 164],
            'Deep Pink' => [255, 20, 147],
            'Deep Puce' => [169, 92, 104],
            'Deep Red' => [133, 1, 1],
            'Deep Ruby' => [132, 63, 91],
            'Deep Saffron' => [255, 153, 51],
            'Deep Sky Blue' => [0, 191, 255],
            'Deep Space Sparkle' => [74, 100, 108],
            'Deep Spring Bud' => [85, 107, 47],
            'Deep Taupe' => [126, 94, 96],
            'Deep Tuscan Red' => [102, 66, 77],
            'Deep Violet' => [51, 0, 102],
            'Deer' => [186, 135, 89],
            'Denim' => [21, 96, 189],
            'Desaturated Cyan' => [102, 153, 153],
            'Desert Sand' => [237, 201, 175],
            'Desert' => [193, 154, 107],
            'Desire' => [234, 60, 83],
            'Diamond' => [185, 242, 255],
            'Dim Gray' => [105, 105, 105],
            'Dirt' => [155, 118, 83],
            'Dodger Blue' => [30, 144, 255],
            'Dogwood Rose' => [215, 24, 104],
            'Dollar Bill' => [133, 187, 101],
            'Donkey Brown' => [102, 76, 40],
            'Drab' => [150, 113, 23],
            'Duke Blue' => [0, 0, 156],
            'Dust Storm' => [229, 204, 201],
            'Dutch White' => [239, 223, 187],
            'Earth Yellow' => [225, 169, 95],
            'Ebony' => [85, 93, 80],
            'Ecru' => [194, 178, 128],
            'Eerie Black' => [27, 27, 27],
            'Eggplant' => [97, 64, 81],
            'Eggshell' => [240, 234, 214],
            'Egyptian Blue' => [16, 52, 166],
            'Electric Blue' => [125, 249, 255],
            'Electric Crimson' => [255, 0, 63],
            'Electric Cyan' => [0, 255, 255],
            'Electric Green' => [0, 255, 0],
            'Electric Indigo' => [111, 0, 255],
            'Electric Lavender' => [244, 187, 255],
            'Electric Lime' => [204, 255, 0],
            'Electric Purple' => [191, 0, 255],
            'Electric Ultramarine' => [63, 0, 255],
            'Electric Violet' => [143, 0, 255],
            'Electric Yellow' => [255, 255, 51],
            'Emerald' => [80, 200, 120],
            'Eminence' => [108, 48, 130],
            'English Green' => [27, 77, 62],
            'English Lavender' => [180, 131, 149],
            'English Red' => [171, 75, 82],
            'English Violet' => [86, 60, 92],
            'Eton Blue' => [150, 200, 162],
            'Eucalyptus' => [68, 215, 168],
            'Fallow' => [193, 154, 107],
            'Falu Red' => [128, 24, 24],
            'Fandango Pink' => [222, 82, 133],
            'Fandango' => [181, 51, 137],
            'Fashion Fuchsia' => [244, 0, 161],
            'Fawn' => [229, 170, 112],
            'Feldgrau' => [77, 93, 83],
            'Feldspar' => [253, 213, 177],
            'Fern Green' => [79, 121, 66],
            'Ferrari Red' => [255, 40, 0],
            'Field Drab' => [108, 84, 30],
            'Fire Engine Red' => [206, 32, 41],
            'Firebrick' => [178, 34, 34],
            'Flame' => [226, 88, 34],
            'Flamingo Pink' => [252, 142, 172],
            'Flattery' => [107, 68, 35],
            'Flavescent' => [247, 233, 142],
            'Flax' => [238, 220, 130],
            'Flirt' => [162, 0, 109],
            'Floral White' => [255, 250, 240],
            'Fluorescent Orange' => [255, 191, 0],
            'Fluorescent Pink' => [255, 20, 147],
            'Fluorescent Yellow' => [204, 255, 0],
            'Folly' => [255, 0, 79],
            'Forest Green (Traditional)' => [1, 68, 33],
            'Forest Green (Web)' => [34, 139, 34],
            'French Beige' => [166, 123, 91],
            'French Bistre' => [133, 109, 77],
            'French Blue' => [0, 114, 187],
            'French Fuchsia' => [253, 63, 146],
            'French Lilac' => [134, 96, 142],
            'French Lime' => [158, 253, 56],
            'French Mauve' => [212, 115, 212],
            'French Pink' => [253, 108, 158],
            'French Plum' => [129, 20, 83],
            'French Puce' => [78, 22, 9],
            'French Raspberry' => [199, 44, 72],
            'French Rose' => [246, 74, 138],
            'French Sky Blue' => [119, 181, 254],
            'French Violet' => [136, 6, 206],
            'French Wine' => [172, 30, 68],
            'Fresh Air' => [166, 231, 255],
            'Fuchsia (Crayola)' => [193, 84, 193],
            'Fuchsia Pink' => [255, 119, 255],
            'Fuchsia Purple' => [204, 57, 123],
            'Fuchsia Rose' => [199, 67, 117],
            'Fuchsia' => [255, 0, 255],
            'Fulvous' => [228, 132, 0],
            'Fuzzy Wuzzy' => [204, 102, 102],
            'Gainsboro' => [220, 220, 220],
            'Gamboge Orange (Brown)' => [153, 102, 0],
            'Gamboge' => [228, 155, 15],
            'Generic Viridian' => [0, 127, 102],
            'Ghost White' => [248, 248, 255],
            'Giants Orange' => [254, 90, 29],
            'Ginger' => [176, 101, 0],
            'Glaucous' => [96, 130, 182],
            'Glitter' => [230, 232, 250],
            'GO Green' => [0, 171, 102],
            'Gold (Metallic)' => [212, 175, 55],
            'Gold (Web, Golden)' => [255, 215, 0],
            'Gold Fusion' => [133, 117, 78],
            'Golden Brown' => [153, 101, 21],
            'Golden Poppy' => [252, 194, 0],
            'Golden Yellow' => [255, 223, 0],
            'Goldenrod' => [218, 165, 32],
            'Granny Smith Apple' => [168, 228, 160],
            'Grape' => [111, 45, 168],
            'Gray (HTML/CSS Gray)' => [128, 128, 128],
            'Gray (X11 Gray)' => [190, 190, 190],
            'Gray' => [128, 128, 128],
            'Gray-Asparagus' => [70, 89, 69],
            'Gray-Blue' => [140, 146, 172],
            'Green (Color Wheel, X11 Green)' => [0, 255, 0],
            'Green (Crayola)' => [28, 172, 120],
            'Green (HTML/CSS Color)' => [0, 128, 0],
            'Green (Munsell)' => [0, 168, 119],
            'Green (NCS)' => [0, 159, 107],
            'Green (Pantone)' => [0, 173, 67],
            'Green (Pigment)' => [0, 165, 80],
            'Green (RYB)' => [102, 176, 50],
            'Green-Blue' => [17, 100, 180],
            'Green-Cyan' => [0, 153, 102],
            'Green-Yellow' => [173, 255, 47],
            'Grizzly' => [136, 88, 24],
            'Grullo' => [169, 154, 134],
            'Gunmetal' => [42, 52, 57],
            'Guppie Green' => [0, 255, 127],
            'Halayà Úbe' => [102, 56, 84],
            'Han Blue' => [68, 108, 207],
            'Han Purple' => [82, 24, 250],
            'Hansa Yellow' => [233, 214, 107],
            'Harlequin Green' => [70, 203, 24],
            'Harlequin' => [63, 255, 0],
            'Harvard Crimson' => [201, 0, 22],
            'Harvest Gold' => [218, 145, 0],
            'Heart Gold' => [128, 128, 0],
            'Heliotrope Gray' => [170, 152, 169],
            'Heliotrope Magenta' => [170, 0, 187],
            'Heliotrope' => [223, 115, 255],
            'Hollywood Cerise' => [244, 0, 161],
            'Honeydew' => [240, 255, 240],
            'Honolulu Blue' => [0, 109, 176],
            'Hooker\'s Green' => [73, 121, 107],
            'Hot Magenta' => [255, 29, 206],
            'Hot Pink' => [255, 105, 180],
            'Hunter Green' => [53, 94, 59],
            'Iceberg' => [113, 166, 210],
            'Icterine' => [252, 247, 94],
            'Illuminating Emerald' => [49, 145, 119],
            'Imperial Blue' => [0, 35, 149],
            'Imperial Purple' => [102, 2, 60],
            'Imperial Red' => [237, 41, 57],
            'Imperial' => [96, 47, 107],
            'Inchworm' => [178, 236, 93],
            'Independence' => [76, 81, 109],
            'India Green' => [19, 136, 8],
            'Indian Red' => [205, 92, 92],
            'Indian Yellow' => [227, 168, 87],
            'Indigo (Web)' => [75, 0, 130],
            'Indigo Dye' => [9, 31, 146],
            'Indigo' => [75, 0, 130],
            'International Klein Blue' => [0, 47, 167],
            'Iris' => [90, 79, 207],
            'Irresistible' => [179, 68, 108],
            'Isabelline' => [244, 240, 236],
            'Islamic Green' => [0, 144, 0],
            'Italian Sky Blue' => [178, 255, 255],
            'Ivory' => [255, 255, 240],
            'Jade' => [0, 168, 107],
            'Japanese Carmine' => [157, 41, 51],
            'Japanese Indigo' => [38, 67, 72],
            'Japanese Violet' => [91, 50, 86],
            'Jasmine' => [248, 222, 126],
            'Jasper' => [215, 59, 62],
            'Jazzberry Jam' => [165, 11, 94],
            'Jelly Bean' => [218, 97, 78],
            'Jet' => [52, 52, 52],
            'Jonquil' => [244, 202, 22],
            'Jordy Blue' => [138, 185, 241],
            'June Bud' => [189, 218, 87],
            'Jungle Green' => [41, 171, 135],
            'Kelly Green' => [76, 187, 23],
            'Kenyan Copper' => [124, 28, 5],
            'Keppel' => [58, 176, 158],
            'Khaki (HTML/CSS, Khaki)' => [195, 176, 145],
            'Khaki (X11, Light Khaki)' => [240, 230, 140],
            'Kobe' => [136, 45, 23],
            'Kobi' => [231, 159, 196],
            'Kobicha' => [107, 68, 35],
            'Kombu Green' => [53, 66, 48],
            'KU Crimson' => [232, 0, 13],
            'La Salle Green' => [8, 120, 48],
            'Languid Lavender' => [214, 202, 221],
            'Lapis Lazuli' => [38, 97, 156],
            'Laser Lemon' => [255, 255, 102],
            'Laurel Green' => [169, 186, 157],
            'Lava' => [207, 16, 32],
            'Lavender (Floral)' => [181, 126, 220],
            'Lavender (Web)' => [230, 230, 250],
            'Lavender Blue' => [204, 204, 255],
            'Lavender Blush' => [255, 240, 245],
            'Lavender Gray' => [196, 195, 208],
            'Lavender Indigo' => [148, 87, 235],
            'Lavender Magenta' => [238, 130, 238],
            'Lavender Mist' => [230, 230, 250],
            'Lavender Pink' => [251, 174, 210],
            'Lavender Purple' => [150, 123, 182],
            'Lavender Rose' => [251, 160, 227],
            'Lawn Green' => [124, 252, 0],
            'Lemon Chiffon' => [255, 250, 205],
            'Lemon Curry' => [204, 160, 29],
            'Lemon Glacier' => [253, 255, 0],
            'Lemon Lime' => [227, 255, 0],
            'Lemon Meringue' => [246, 234, 190],
            'Lemon Yellow' => [255, 244, 79],
            'Lemon' => [255, 247, 0],
            'Lenurple' => [186, 147, 216],
            'Liberty' => [84, 90, 167],
            'Licorice' => [26, 17, 16],
            'Light Apricot' => [253, 213, 177],
            'Light Blue' => [173, 216, 230],
            'Light Brilliant Red' => [254, 46, 46],
            'Light Brown' => [181, 101, 29],
            'Light Carmine Pink' => [230, 103, 113],
            'Light Cobalt Blue' => [136, 172, 224],
            'Light Coral' => [240, 128, 128],
            'Light Cornflower Blue' => [147, 204, 234],
            'Light Crimson' => [245, 105, 145],
            'Light Cyan' => [224, 255, 255],
            'Light Deep Pink' => [255, 92, 205],
            'Light French Beige' => [200, 173, 127],
            'Light Fuchsia Pink' => [249, 132, 239],
            'Light Goldenrod Yellow' => [250, 250, 210],
            'Light Gray' => [211, 211, 211],
            'Light Grayish Magenta' => [204, 153, 204],
            'Light Green' => [144, 238, 144],
            'Light Hot Pink' => [255, 179, 222],
            'Light Khaki' => [240, 230, 140],
            'Light Medium Orchid' => [211, 155, 203],
            'Light Moss Green' => [173, 223, 173],
            'Light Orchid' => [230, 168, 215],
            'Light Pastel Purple' => [177, 156, 217],
            'Light Pink' => [255, 182, 193],
            'Light Red Ochre' => [233, 116, 81],
            'Light Salmon Pink' => [255, 153, 153],
            'Light Salmon' => [255, 160, 122],
            'Light Sea Green' => [32, 178, 170],
            'Light Sky Blue' => [135, 206, 250],
            'Light Slate Gray' => [119, 136, 153],
            'Light Steel Blue' => [176, 196, 222],
            'Light Taupe' => [179, 139, 109],
            'Light Thulian Pink' => [230, 143, 172],
            'Light Yellow' => [255, 255, 224],
            'Lilac' => [200, 162, 200],
            'Lime (Color Wheel)' => [191, 255, 0],
            'Lime (Web, X11 Green)' => [0, 255, 0],
            'Lime Green' => [50, 205, 50],
            'Limerick' => [157, 194, 9],
            'Lincoln Green' => [25, 89, 5],
            'Linen' => [250, 240, 230],
            'Lion' => [193, 154, 107],
            'Liseran Purple' => [222, 111, 161],
            'Little Boy Blue' => [108, 160, 220],
            'Liver (Dogs)' => [184, 109, 41],
            'Liver (Organ)' => [108, 46, 31],
            'Liver Chestnut' => [152, 116, 86],
            'Liver' => [103, 76, 71],
            'Livid' => [102, 153, 204],
            'Lumber' => [255, 228, 205],
            'Lust' => [230, 32, 32],
            'Macaroni And Cheese' => [255, 189, 136],
            'Magenta (Crayola)' => [255, 85, 163],
            'Magenta (Dye)' => [202, 31, 123],
            'Magenta (Pantone)' => [208, 65, 126],
            'Magenta (Process)' => [255, 0, 144],
            'Magenta Haze' => [159, 69, 118],
            'Magenta' => [255, 0, 255],
            'Magenta-Pink' => [204, 51, 139],
            'Magic Mint' => [170, 240, 209],
            'Magnolia' => [248, 244, 255],
            'Mahogany' => [192, 64, 0],
            'Maize' => [251, 236, 93],
            'Majorelle Blue' => [96, 80, 220],
            'Malachite' => [11, 218, 81],
            'Manatee' => [151, 154, 170],
            'Mango Tango' => [255, 130, 67],
            'Mantis' => [116, 195, 101],
            'Mardi Gras' => [136, 0, 133],
            'Marigold' => [234, 162, 33],
            'Maroon (Crayola)' => [195, 33, 72],
            'Maroon (HTML/CSS)' => [128, 0, 0],
            'Maroon (X11)' => [176, 48, 96],
            'Mauve Taupe' => [145, 95, 109],
            'Mauve' => [224, 176, 255],
            'Mauvelous' => [239, 152, 170],
            'May Green' => [76, 145, 65],
            'Maya Blue' => [115, 194, 251],
            'Meat Brown' => [229, 183, 59],
            'Medium Aquamarine' => [102, 221, 170],
            'Medium Blue' => [0, 0, 205],
            'Medium Candy Apple Red' => [226, 6, 44],
            'Medium Carmine' => [175, 64, 53],
            'Medium Champagne' => [243, 229, 171],
            'Medium Electric Blue' => [3, 80, 150],
            'Medium Jungle Green' => [28, 53, 45],
            'Medium Lavender Magenta' => [221, 160, 221],
            'Medium Orchid' => [186, 85, 211],
            'Medium Persian Blue' => [0, 103, 165],
            'Medium Purple' => [147, 112, 219],
            'Medium Red-Violet' => [187, 51, 133],
            'Medium Ruby' => [170, 64, 105],
            'Medium Sea Green' => [60, 179, 113],
            'Medium Sky Blue' => [128, 218, 235],
            'Medium Slate Blue' => [123, 104, 238],
            'Medium Spring Bud' => [201, 220, 135],
            'Medium Spring Green' => [0, 250, 154],
            'Medium Taupe' => [103, 76, 71],
            'Medium Turquoise' => [72, 209, 204],
            'Medium Tuscan Red' => [121, 68, 59],
            'Medium Vermilion' => [217, 96, 59],
            'Medium Violet-Red' => [199, 21, 133],
            'Mellow Apricot' => [248, 184, 120],
            'Mellow Yellow' => [248, 222, 126],
            'Melon' => [253, 188, 180],
            'Metallic Seaweed' => [10, 126, 140],
            'Metallic Sunburst' => [156, 124, 56],
            'Mexican Pink' => [228, 0, 124],
            'Midnight Blue' => [25, 25, 112],
            'Midnight Green (Eagle Green)' => [0, 73, 83],
            'Mikado Yellow' => [255, 196, 12],
            'Mindaro' => [227, 249, 136],
            'Ming' => [54, 116, 125],
            'Mint Cream' => [245, 255, 250],
            'Mint Green' => [152, 255, 152],
            'Mint' => [62, 180, 137],
            'Misty Rose' => [255, 228, 225],
            'Moccasin' => [250, 235, 215],
            'Mode Beige' => [150, 113, 23],
            'Moonstone Blue' => [115, 169, 194],
            'Mordant Red 19' => [174, 12, 0],
            'Moss Green' => [138, 154, 91],
            'Mountain Meadow' => [48, 186, 143],
            'Mountbatten Pink' => [153, 122, 141],
            'MSU Green' => [24, 69, 59],
            'Mughal Green' => [48, 96, 48],
            'Mulberry' => [197, 75, 140],
            'Mustard' => [255, 219, 88],
            'Myrtle Green' => [49, 120, 115],
            'Nadeshiko Pink' => [246, 173, 198],
            'Napier Green' => [42, 128, 0],
            'Naples Yellow' => [250, 218, 94],
            'Navajo White' => [255, 222, 173],
            'Navy Purple' => [148, 87, 235],
            'Navy' => [0, 0, 128],
            'Neon Carrot' => [255, 163, 67],
            'Neon Fuchsia' => [254, 65, 100],
            'Neon Green' => [57, 255, 20],
            'New Car' => [33, 79, 198],
            'New York Pink' => [215, 131, 127],
            'Non-Photo Blue' => [164, 221, 237],
            'North Texas Green' => [5, 144, 51],
            'Nyanza' => [233, 255, 219],
            'Ocean Boat Blue' => [0, 119, 190],
            'Ochre' => [204, 119, 34],
            'Office Green' => [0, 128, 0],
            'Old Burgundy' => [67, 48, 46],
            'Old Gold' => [207, 181, 59],
            'Old Heliotrope' => [86, 60, 92],
            'Old Lace' => [253, 245, 230],
            'Old Lavender' => [121, 104, 120],
            'Old Mauve' => [103, 49, 71],
            'Old Moss Green' => [134, 126, 54],
            'Old Rose' => [192, 128, 129],
            'Old Silver' => [132, 132, 130],
            'Olive Drab (' => [107, 142, 35],
            'Olive Drab' => [60, 52, 31],
            'Olive' => [128, 128, 0],
            'Olivine' => [154, 185, 115],
            'Onyx' => [53, 56, 57],
            'Opera Mauve' => [183, 132, 167],
            'Orange (Aerospace)' => [255, 79, 0],
            'Orange (Color Wheel)' => [255, 127, 0],
            'Orange (Crayola)' => [255, 117, 56],
            'Orange (Engineering)' => [186, 22, 12],
            'Orange (Golden Gate)' => [192, 54, 44],
            'Orange (Pantone)' => [255, 88, 0],
            'Orange (RYB)' => [251, 153, 2],
            'Orange (Web)' => [255, 165, 0],
            'Orange Peel' => [255, 159, 0],
            'Orange-Red' => [255, 69, 0],
            'Orange-Yellow' => [248, 213, 104],
            'Orchid Pink' => [242, 189, 205],
            'Orchid' => [218, 112, 214],
            'Orioles Orange' => [251, 79, 20],
            'Otter Brown' => [101, 67, 33],
            'OU Crimson Red' => [153, 0, 0],
            'Outer Space' => [65, 74, 76],
            'Outrageous Orange' => [255, 110, 74],
            'Oxford Blue' => [0, 33, 71],
            'Pacific Blue' => [28, 169, 201],
            'Pakistan Green' => [0, 102, 0],
            'Palatinate Blue' => [39, 59, 226],
            'Palatinate Purple' => [104, 40, 96],
            'Pale Aqua' => [188, 212, 230],
            'Pale Blue' => [175, 238, 238],
            'Pale Brown' => [152, 118, 84],
            'Pale Carmine' => [175, 64, 53],
            'Pale Cerulean' => [155, 196, 226],
            'Pale Chestnut' => [221, 173, 175],
            'Pale Copper' => [218, 138, 103],
            'Pale Cornflower Blue' => [171, 205, 239],
            'Pale Cyan' => [135, 211, 248],
            'Pale Gold' => [230, 190, 138],
            'Pale Goldenrod' => [238, 232, 170],
            'Pale Green' => [152, 251, 152],
            'Pale Lavender' => [220, 208, 255],
            'Pale Magenta' => [249, 132, 229],
            'Pale Magenta-Pink' => [255, 153, 204],
            'Pale Pink' => [250, 218, 221],
            'Pale Plum' => [221, 160, 221],
            'Pale Red-Violet' => [219, 112, 147],
            'Pale Robin Egg Blue' => [150, 222, 209],
            'Pale Silver' => [201, 192, 187],
            'Pale Spring Bud' => [236, 235, 189],
            'Pale Taupe' => [188, 152, 126],
            'Pale Turquoise' => [175, 238, 238],
            'Pale Violet' => [204, 153, 255],
            'Pale Violet-Red' => [219, 112, 147],
            'Pansy Purple' => [120, 24, 74],
            'Paolo Veronese Green' => [0, 155, 125],
            'Papaya Whip' => [255, 239, 213],
            'Paradise Pink' => [230, 62, 98],
            'Paris Green' => [80, 200, 120],
            'Pastel Blue' => [174, 198, 207],
            'Pastel Brown' => [131, 105, 83],
            'Pastel Gray' => [207, 207, 196],
            'Pastel Green' => [119, 221, 119],
            'Pastel Magenta' => [244, 154, 194],
            'Pastel Orange' => [255, 179, 71],
            'Pastel Pink' => [222, 165, 164],
            'Pastel Purple' => [179, 158, 181],
            'Pastel Red' => [255, 105, 97],
            'Pastel Violet' => [203, 153, 201],
            'Pastel Yellow' => [253, 253, 150],
            'Patriarch' => [128, 0, 128],
            'Payne\'s Grey' => [83, 104, 120],
            'Peach Puff' => [255, 218, 185],
            'Peach' => [255, 203, 164],
            'Peach-Orange' => [255, 204, 153],
            'Peach-Yellow' => [250, 223, 173],
            'Pear' => [209, 226, 49],
            'Pearl Aqua' => [136, 216, 192],
            'Pearl' => [234, 224, 200],
            'Pearly Purple' => [183, 104, 162],
            'Peridot' => [230, 226, 0],
            'Periwinkle' => [204, 204, 255],
            'Permanent Geranium Lake' => [225, 44, 44],
            'Persian Blue' => [28, 57, 187],
            'Persian Green' => [0, 166, 147],
            'Persian Indigo' => [50, 18, 122],
            'Persian Orange' => [217, 144, 88],
            'Persian Pink' => [247, 127, 190],
            'Persian Plum' => [112, 28, 28],
            'Persian Red' => [204, 51, 51],
            'Persian Rose' => [254, 40, 162],
            'Persimmon' => [236, 88, 0],
            'Peru' => [205, 133, 63],
            'Phlox' => [223, 0, 255],
            'Phthalo Blue' => [0, 15, 137],
            'Phthalo Green' => [18, 53, 36],
            'Picton Blue' => [69, 177, 232],
            'Pictorial Carmine' => [195, 11, 78],
            'Piggy Pink' => [253, 221, 230],
            'Pine Green' => [1, 121, 111],
            'Pineapple' => [86, 60, 92],
            'Pink (Pantone)' => [215, 72, 148],
            'Pink Flamingo' => [252, 116, 253],
            'Pink Lace' => [255, 221, 244],
            'Pink Lavender' => [216, 178, 209],
            'Pink Pearl' => [231, 172, 207],
            'Pink Raspberry' => [152, 0, 54],
            'Pink Sherbet' => [247, 143, 167],
            'Pink' => [255, 192, 203],
            'Pink-Orange' => [255, 153, 102],
            'Pistachio' => [147, 197, 114],
            'Platinum' => [229, 228, 226],
            'Plum (Web)' => [221, 160, 221],
            'Plum' => [142, 69, 133],
            'Pomp And Power' => [134, 96, 142],
            'Popstar' => [190, 79, 98],
            'Portland Orange' => [255, 90, 54],
            'Powder Blue' => [176, 224, 230],
            'Princeton Orange' => [245, 128, 37],
            'Prune' => [112, 28, 28],
            'Prussian Blue' => [0, 49, 83],
            'Psychedelic Purple' => [223, 0, 255],
            'Puce Red' => [114, 47, 55],
            'Puce' => [204, 136, 153],
            'Pullman Brown (UPS Brown)' => [100, 65, 23],
            'Pullman Green' => [59, 51, 28],
            'Pumpkin' => [255, 117, 24],
            'Purple (HTML)' => [128, 0, 128],
            'Purple (Munsell)' => [159, 0, 197],
            'Purple (X11)' => [160, 32, 240],
            'Purple Heart' => [105, 53, 156],
            'Purple Mountain Majesty' => [150, 120, 182],
            'Purple Navy' => [78, 81, 128],
            'Purple Pizzazz' => [254, 78, 218],
            'Purple Taupe' => [80, 64, 77],
            'Purpureus' => [154, 78, 174],
            'Quartz' => [81, 72, 79],
            'Queen Blue' => [67, 107, 149],
            'Queen Pink' => [232, 204, 215],
            'Quinacridone Magenta' => [142, 58, 89],
            'Rackley' => [93, 138, 168],
            'Radical Red' => [255, 53, 94],
            'Raisin Black' => [36, 33, 36],
            'Rajah' => [251, 171, 96],
            'Raspberry Glace' => [145, 95, 109],
            'Raspberry Pink' => [226, 80, 152],
            'Raspberry Rose' => [179, 68, 108],
            'Raspberry' => [227, 11, 93],
            'Raw Sienna' => [214, 138, 89],
            'Raw Umber' => [130, 102, 68],
            'Razzle Dazzle Rose' => [255, 51, 204],
            'Razzmatazz' => [227, 37, 107],
            'Razzmic Berry' => [141, 78, 133],
            'Rebecca Purple' => [102, 51, 153],
            'Red (Crayola)' => [238, 32, 77],
            'Red (Munsell)' => [242, 0, 60],
            'Red (NCS)' => [196, 2, 51],
            'Red (Pantone)' => [237, 41, 57],
            'Red (Pigment)' => [237, 28, 36],
            'Red (RYB)' => [254, 39, 18],
            'Red Devil' => [134, 1, 17],
            'Red' => [255, 0, 0],
            'Red-Brown' => [165, 42, 42],
            'Red-Orange' => [255, 83, 73],
            'Red-Purple' => [228, 0, 120],
            'Red-Violet' => [199, 21, 133],
            'Redwood' => [164, 90, 82],
            'Regalia' => [82, 45, 128],
            'Registration Black' => [0, 0, 0],
            'Resolution Blue' => [0, 35, 135],
            'Rhythm' => [119, 118, 150],
            'Rich Black (FOGRA29)' => [1, 11, 19],
            'Rich Black (FOGRA39)' => [1, 2, 3],
            'Rich Black' => [0, 64, 64],
            'Rich Brilliant Lavender' => [241, 167, 254],
            'Rich Carmine' => [215, 0, 64],
            'Rich Electric Blue' => [8, 146, 208],
            'Rich Lavender' => [167, 107, 207],
            'Rich Lilac' => [182, 102, 210],
            'Rich Maroon' => [176, 48, 96],
            'Rifle Green' => [68, 76, 56],
            'Roast Coffee' => [112, 66, 65],
            'Robin Egg Blue' => [0, 204, 204],
            'Rocket Metallic' => [138, 127, 128],
            'Roman Silver' => [131, 137, 150],
            'Rose Bonbon' => [249, 66, 158],
            'Rose Ebony' => [103, 72, 70],
            'Rose Gold' => [183, 110, 121],
            'Rose Madder' => [227, 38, 54],
            'Rose Pink' => [255, 102, 204],
            'Rose Quartz' => [170, 152, 169],
            'Rose Red' => [194, 30, 86],
            'Rose Taupe' => [144, 93, 93],
            'Rose Vale' => [171, 78, 82],
            'Rose' => [255, 0, 127],
            'Rosewood' => [101, 0, 11],
            'Rosso Corsa' => [212, 0, 0],
            'Rosy Brown' => [188, 143, 143],
            'Royal Azure' => [0, 56, 168],
            'Royal Blue' => [65, 105, 225],
            'Royal Fuchsia' => [202, 44, 146],
            'Royal Purple' => [120, 81, 169],
            'Royal Yellow' => [250, 218, 94],
            'Ruber' => [206, 70, 118],
            'Rubine Red' => [209, 0, 86],
            'Ruby Red' => [155, 17, 30],
            'Ruby' => [224, 17, 95],
            'Ruddy Brown' => [187, 101, 40],
            'Ruddy Pink' => [225, 142, 150],
            'Ruddy' => [255, 0, 40],
            'Rufous' => [168, 28, 7],
            'Russet' => [128, 70, 27],
            'Russian Green' => [103, 146, 103],
            'Russian Violet' => [50, 23, 77],
            'Rust' => [183, 65, 14],
            'Rusty Red' => [218, 44, 67],
            'Sacramento State Green' => [0, 86, 63],
            'Saddle Brown' => [139, 69, 19],
            'Safety Orange (Blaze Orange)' => [255, 103, 0],
            'Safety Orange' => [255, 120, 0],
            'Safety Yellow' => [238, 210, 2],
            'Saffron' => [244, 196, 48],
            'Sage' => [188, 184, 138],
            'Salmon Pink' => [255, 145, 164],
            'Salmon' => [250, 128, 114],
            'Sand Dune' => [150, 113, 23],
            'Sand' => [194, 178, 128],
            'Sandstorm' => [236, 213, 64],
            'Sandy Brown' => [244, 164, 96],
            'Sandy Taupe' => [150, 113, 23],
            'Sangria' => [146, 0, 10],
            'Sap Green' => [80, 125, 42],
            'Sapphire Blue' => [0, 103, 165],
            'Sapphire' => [15, 82, 186],
            'Satin Sheen Gold' => [203, 161, 53],
            'Scarlet' => [253, 14, 53],
            'Schauss Pink' => [255, 145, 175],
            'School Bus Yellow' => [255, 216, 0],
            'Screamin\' Green' => [118, 255, 122],
            'Sea Blue' => [0, 105, 148],
            'Sea Green' => [46, 139, 87],
            'Seal Brown' => [89, 38, 11],
            'Seashell' => [255, 245, 238],
            'Selective Yellow' => [255, 186, 0],
            'Sepia' => [112, 66, 20],
            'Shadow Blue' => [119, 139, 165],
            'Shadow' => [138, 121, 93],
            'Shampoo' => [255, 207, 241],
            'Shamrock Green' => [0, 158, 96],
            'Sheen Green' => [143, 212, 0],
            'Shimmering Blush' => [217, 134, 149],
            'Shocking Pink (Crayola)' => [255, 111, 255],
            'Shocking Pink' => [252, 15, 192],
            'Sienna' => [136, 45, 23],
            'Silver Chalice' => [172, 172, 172],
            'Silver Lake Blue' => [93, 137, 186],
            'Silver Pink' => [196, 174, 173],
            'Silver Sand' => [191, 193, 194],
            'Silver' => [192, 192, 192],
            'Sinopia' => [203, 65, 11],
            'Skobeloff' => [0, 116, 116],
            'Sky Blue' => [135, 206, 235],
            'Sky Magenta' => [207, 113, 175],
            'Slate Blue' => [106, 90, 205],
            'Slate Gray' => [112, 128, 144],
            'Smalt (Dark Powder Blue)' => [0, 51, 153],
            'Smitten' => [200, 65, 134],
            'Smoke' => [115, 130, 118],
            'Smoky Black' => [16, 12, 8],
            'Smoky Topaz' => [147, 61, 65],
            'Snow' => [255, 250, 250],
            'Soap' => [206, 200, 239],
            'Solid Pink' => [137, 56, 67],
            'Sonic Silver' => [117, 117, 117],
            'Space Cadet' => [29, 41, 81],
            'Spanish Bistre' => [128, 117, 50],
            'Spanish Blue' => [0, 112, 184],
            'Spanish Carmine' => [209, 0, 71],
            'Spanish Crimson' => [229, 26, 76],
            'Spanish Gray' => [152, 152, 152],
            'Spanish Green' => [0, 145, 80],
            'Spanish Orange' => [232, 97, 0],
            'Spanish Pink' => [247, 191, 190],
            'Spanish Red' => [230, 0, 38],
            'Spanish Sky Blue' => [0, 255, 255],
            'Spanish Violet' => [76, 40, 130],
            'Spanish Viridian' => [0, 127, 92],
            'Spartan Crimson' => [158, 19, 22],
            'Spicy Mix' => [139, 95, 77],
            'Spiro Disco Ball' => [15, 192, 252],
            'Spring Bud' => [167, 252, 0],
            'Spring Green' => [0, 255, 127],
            'St. Patrick\'s Blue' => [35, 41, 122],
            'Star Command Blue' => [0, 123, 184],
            'Steel Blue' => [70, 130, 180],
            'Steel Pink' => [204, 51, 204],
            'Stil De Grain Yellow' => [250, 218, 94],
            'Stizza' => [153, 0, 0],
            'Stormcloud' => [79, 102, 106],
            'Straw' => [228, 217, 111],
            'Strawberry' => [252, 90, 141],
            'Sunglow' => [255, 204, 51],
            'Sunray' => [227, 171, 87],
            'Sunset Orange' => [253, 94, 83],
            'Sunset' => [250, 214, 165],
            'Super Pink' => [207, 107, 169],
            'Tan' => [210, 180, 140],
            'Tangelo' => [249, 77, 0],
            'Tangerine Yellow' => [255, 204, 0],
            'Tangerine' => [242, 133, 0],
            'Tango Pink' => [228, 113, 122],
            'Taupe Gray' => [139, 133, 137],
            'Taupe' => [72, 60, 50],
            'Tea Green' => [208, 240, 192],
            'Tea Rose' => [244, 194, 194],
            'Teal Blue' => [54, 117, 136],
            'Teal Deer' => [153, 230, 179],
            'Teal Green' => [0, 130, 127],
            'Teal' => [0, 128, 128],
            'Telemagenta' => [207, 52, 118],
            'Tenné' => [205, 87, 0],
            'Terra Cotta' => [226, 114, 91],
            'Thistle' => [216, 191, 216],
            'Thulian Pink' => [222, 111, 161],
            'Tickle Me Pink' => [252, 137, 172],
            'Tiffany Blue' => [10, 186, 181],
            'Tiger\'s Eye' => [224, 141, 60],
            'Timberwolf' => [219, 215, 210],
            'Titanium Yellow' => [238, 230, 0],
            'Tomato' => [255, 99, 71],
            'Toolbox' => [116, 108, 192],
            'Topaz' => [255, 200, 124],
            'Tractor Red' => [253, 14, 53],
            'Trolley Grey' => [128, 128, 128],
            'Tropical Rain Forest' => [0, 117, 94],
            'Tropical Violet' => [205, 164, 222],
            'True Blue' => [0, 115, 207],
            'Tufts Blue' => [65, 125, 193],
            'Tulip' => [255, 135, 141],
            'Tumbleweed' => [222, 170, 136],
            'Turkish Rose' => [181, 114, 129],
            'Turquoise Blue' => [0, 255, 239],
            'Turquoise Green' => [160, 214, 180],
            'Turquoise' => [64, 224, 208],
            'Tuscan Brown' => [111, 78, 55],
            'Tuscan Red' => [124, 72, 72],
            'Tuscan Tan' => [166, 123, 91],
            'Tuscan' => [250, 214, 165],
            'Tuscany' => [192, 153, 153],
            'Twilight Lavender' => [138, 73, 107],
            'Tyrian Purple' => [102, 2, 60],
            'UA Blue' => [0, 51, 170],
            'UA Red' => [217, 0, 76],
            'Ube' => [136, 120, 195],
            'UCLA Blue' => [83, 104, 149],
            'UCLA Gold' => [255, 179, 0],
            'UFO Green' => [60, 208, 112],
            'Ultra Pink' => [255, 111, 255],
            'Ultra Red' => [252, 108, 133],
            'Ultramarine Blue' => [65, 102, 245],
            'Ultramarine' => [63, 0, 255],
            'Umber' => [99, 81, 71],
            'Unbleached Silk' => [255, 221, 202],
            'United Nations Blue' => [91, 146, 229],
            'University of California Gold' => [183, 135, 39],
            'University of Tennessee Orange' => [247, 127, 0],
            'Unmellow Yellow' => [255, 255, 102],
            'UP Forest Green' => [1, 68, 33],
            'UP Maroon' => [123, 17, 19],
            'Upsdell Red' => [174, 32, 41],
            'Urobilin' => [225, 173, 33],
            'USAFA Blue' => [0, 79, 152],
            'USC Cardinal' => [153, 0, 0],
            'USC Gold' => [255, 204, 0],
            'Utah Crimson' => [211, 0, 63],
            'Vanilla Ice' => [243, 143, 169],
            'Vanilla' => [243, 229, 171],
            'Vegas Gold' => [197, 179, 88],
            'Venetian Red' => [200, 8, 21],
            'Verdigris' => [67, 179, 174],
            'Vermilion' => [217, 56, 30],
            'Veronica' => [160, 32, 240],
            'Very Light Azure' => [116, 187, 251],
            'Very Light Blue' => [102, 102, 255],
            'Very Light Malachite Green' => [100, 233, 134],
            'Very Light Tangelo' => [255, 176, 119],
            'Very Pale Orange' => [255, 223, 191],
            'Very Pale Yellow' => [255, 255, 191],
            'Violet (Color Wheel)' => [127, 0, 255],
            'Violet (RYB)' => [134, 1, 175],
            'Violet (Web)' => [238, 130, 238],
            'Violet' => [143, 0, 255],
            'Violet-Blue' => [50, 74, 178],
            'Violet-Red' => [247, 83, 148],
            'Viridian Green' => [0, 150, 152],
            'Viridian' => [64, 130, 109],
            'Vista Blue' => [124, 158, 217],
            'Vivid Amber' => [204, 153, 0],
            'Vivid Auburn' => [146, 39, 36],
            'Vivid Burgundy' => [159, 29, 53],
            'Vivid Cerise' => [218, 29, 129],
            'Vivid Cerulean' => [0, 170, 238],
            'Vivid Crimson' => [204, 0, 51],
            'Vivid Gamboge' => [255, 153, 0],
            'Vivid Lime Green' => [166, 214, 8],
            'Vivid Malachite' => [0, 204, 51],
            'Vivid Mulberry' => [184, 12, 227],
            'Vivid Orange Peel' => [255, 160, 0],
            'Vivid Orange' => [255, 95, 0],
            'Vivid Orchid' => [204, 0, 255],
            'Vivid Raspberry' => [255, 0, 108],
            'Vivid Red' => [247, 13, 26],
            'Vivid Red-Tangelo' => [223, 97, 36],
            'Vivid Sky Blue' => [0, 204, 255],
            'Vivid Tangelo' => [240, 116, 39],
            'Vivid Tangerine' => [255, 160, 137],
            'Vivid Vermilion' => [229, 96, 36],
            'Vivid Violet' => [159, 0, 255],
            'Vivid Yellow' => [255, 227, 2],
            'Volt' => [206, 255, 0],
            'Warm Black' => [0, 66, 66],
            'Waterspout' => [164, 244, 249],
            'Weldon Blue' => [124, 152, 171],
            'Wenge' => [100, 84, 82],
            'Wheat' => [245, 222, 179],
            'White Smoke' => [245, 245, 245],
            'White' => [255, 255, 255],
            'Wild Blue Yonder' => [162, 173, 208],
            'Wild Orchid' => [212, 112, 162],
            'Wild Strawberry' => [255, 67, 164],
            'Wild Watermelon' => [252, 108, 133],
            'Willpower Orange' => [253, 88, 0],
            'Windsor Tan' => [167, 85, 2],
            'Wine Dregs' => [103, 49, 71],
            'Wine' => [114, 47, 55],
            'Wisteria' => [201, 160, 220],
            'Wood Brown' => [193, 154, 107],
            'Xanadu' => [115, 134, 120],
            'Yale Blue' => [15, 77, 146],
            'Yankees Blue' => [28, 40, 65],
            'Yellow (Crayola)' => [252, 232, 131],
            'Yellow (Munsell)' => [239, 204, 0],
            'Yellow (NCS)' => [255, 211, 0],
            'Yellow (Pantone)' => [254, 223, 0],
            'Yellow (Process)' => [255, 239, 0],
            'Yellow (RYB)' => [254, 254, 51],
            'Yellow Orange' => [255, 174, 66],
            'Yellow Rose' => [255, 240, 0],
            'Yellow' => [255, 255, 0],
            'Yellow-Green' => [154, 205, 50],
            'Zaffre' => [0, 20, 168],
            'Zinnwaldite Brown' => [44, 22, 8],
            'Zomp' => [57, 167, 14],
        ];
    }
}
