Color Library: Rainbow Index & Simplest Return Color
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pip-Whisperer
//Shoutout to @Pine-Coders for going through all the rainbow colors and making this easy
// If you guys make some crazy larger color library comment below so i can see it, i love the RGB beauty haha :)
//@version=5
// @description TODO: add library description here
library("Colors")

// @function TODO: color.this(Brown)
// @param x TODO: String Color Name
// @returns TODO: Color
export this(simple string Color) =>
    switch Color
        "brown"        => color.new(#442211, 0)
        "wood"         => color.new(#774433, 0)
        "tan"          => color.new(#AA8855, 0)
        "gold"         => color.new(#C0C000, 0)
        "olive"        => color.new(#808000, 0)
        "green"        => color.new(#008000, 0)
        "teal"         => color.new(#008080, 0)
        "navy"         => color.new(#000088, 0) 
        "maroon"       => color.new(#800000, 0)
        "coral"        => color.new(#FF8080, 0)
        "lavender"     => color.new(#8080FF, 0)
        "indigo"       => color.new(#440088, 0) 
        "darkpurple"   => color.new(#660066, 0)
        "purple"       => color.new(#990099, 0)
        "fuchsia"      => color.new(#FF00FF, 0)
        "violet"       => color.new(#AA00FF, 0)
        "hanpurple"    => color.new(#5500FF, 0)
        "blue "        => color.new(#0000FF, 0)
        "cichlid"      => color.new(#0044FF, 0)
        "azure"        => color.new(#0080FF, 0)
        "skyblue"      => color.new(#00BBFF, 0)
        "aqua "        => color.new(#00FFFF, 0)
        "mint"         => color.new(#00FF80, 0)
        "lime"         => color.new(#00FF00, 0)
        "chartreuse"   => color.new(#80FF00, 0)
        "yellow"       => color.new(#FFFF00, 0)
        "amber"        => color.new(#FFC000, 0)
        "orange"       => color.new(#FF8000, 0)
        "redorange"    => color.new(#FF4400, 0)
        "red"          => color.new(#FF0000, 0)
        "hotpink"      => color.new(#FF0099, 0)
        "fuchsia"      => color.new(#FF00FF, 0) 
        "pink"         => color.new(#FF99FF, 0)
        "white"        => color.new(#FFFFFF, 0) 
        "silver"       => color.new(#C0C0C0, 0)
        "gray"         => color.new(#808080, 0)
        "darkgray"     => color.new(#404040, 0)
        "nero"         => color.new(#202020, 0) 
        "eclipse"      => color.new(#101010, 0) 
        "black"        => color.new(#000000, 0) 
        "Brown"        => color.new(#442211, 0)
        "Wood"         => color.new(#774433, 0)
        "Tan"          => color.new(#AA8855, 0)
        "Gold"         => color.new(#C0C000, 0)
        "Olive"        => color.new(#808000, 0)
        "Green"        => color.new(#008000, 0)
        "Teal"         => color.new(#008080, 0)
        "Navy"         => color.new(#000088, 0) 
        "Maroon"       => color.new(#800000, 0)
        "Coral"        => color.new(#FF8080, 0)
        "Lavender"     => color.new(#8080FF, 0)
        "Indigo"       => color.new(#440088, 0) 
        "Darkpurple"   => color.new(#660066, 0)
        "Purple"       => color.new(#990099, 0)
        "Fuchsia"      => color.new(#FF00FF, 0)
        "Violet"       => color.new(#AA00FF, 0)
        "Hanpurple"    => color.new(#5500FF, 0)
        "Blue "        => color.new(#0000FF, 0)
        "Cichlid"      => color.new(#0044FF, 0)
        "Azure"        => color.new(#0080FF, 0)
        "Skyblue"      => color.new(#00BBFF, 0)
        "Aqua "        => color.new(#00FFFF, 0)
        "Mint"         => color.new(#00FF80, 0)
        "Lime"         => color.new(#00FF00, 0)
        "Chartreuse"   => color.new(#80FF00, 0)
        "Yellow"       => color.new(#FFFF00, 0)
        "Amber"        => color.new(#FFC000, 0)
        "Orange"       => color.new(#FF8000, 0)
        "Redorange"    => color.new(#FF4400, 0)
        "Red"          => color.new(#FF0000, 0)
        "Hotpink"      => color.new(#FF0099, 0)
        "Fuchsia"      => color.new(#FF00FF, 0) 
        "Pink"         => color.new(#FF99FF, 0)
        "White"        => color.new(#FFFFFF, 0) 
        "Silver"       => color.new(#C0C0C0, 0)
        "Gray"         => color.new(#808080, 0)
        "Darkgray"     => color.new(#404040, 0)
        "Nero"         => color.new(#202020, 0) 
        "Eclipse"      => color.new(#101010, 0) 
        "Black"        => color.new(#000000, 0) 
// @function TODO: Return Rainbow Index
// @param x TODO: Number is index of Rainbow :)
// @returns TODO: Color
export rainbow(simple int Number) =>
    switch Number
        1  => color.new(#442211, 0)
        2  => color.new(#774433, 0)
        3  => color.new(#AA8855, 0)
        4  => color.new(#C0C000, 0)
        5  => color.new(#808000, 0)
        6  => color.new(#008000, 0)
        7  => color.new(#008080, 0)
        8  => color.new(#000088, 0)
        9  => color.new(#800000, 0)
        10 => color.new(#FF8080, 0)
        11 => color.new(#8080FF, 0)
        12 => color.new(#440088, 0)
        13 => color.new(#660066, 0)
        14 => color.new(#990099, 0)
        15 => color.new(#FF00FF, 0)
        16 => color.new(#AA00FF, 0)
        17 => color.new(#5500FF, 0)
        18 => color.new(#0000FF, 0)
        19 => color.new(#0044FF, 0)
        20 => color.new(#0080FF, 0)
        21 => color.new(#00BBFF, 0)
        22 => color.new(#00FFFF, 0)
        23 => color.new(#00FF80, 0)
        24 => color.new(#00FF00, 0)
        25 => color.new(#80FF00, 0)
        26 => color.new(#FFFF00, 0)
        27 => color.new(#FFC000, 0)
        28 => color.new(#FF8000, 0)
        29 => color.new(#FF4400, 0)
        30 => color.new(#FF0000, 0)
        31 => color.new(#FF0099, 0)
        32 => color.new(#FF00FF, 0)
        33 => color.new(#FF99FF, 0)
        34 => color.new(#FFFFFF, 0)
        35 => color.new(#C0C0C0, 0)
        36 => color.new(#808080, 0)
        37 => color.new(#404040, 0)
        38 => color.new(#202020, 0)
        39 => color.new(#101010, 0)
        40 => color.new(#000000, 0)