killerbng icon

color dicts

killerbng | PRO | 03/19/15 02:43:23 AM UTC | 0 ⭐ | 474 👁️ | Never ⏰ | []
Python |

2.73 KB

|

None

|

0 👍

/

0 👎

hex = dict(
    #General
    blue="#0000ff",
    green="#008000",
    grey="#808080",
    #Hair
    blonde="#eedec4",
    angel_blonde="#b3a393",
    brunette="#774812",
    blonde_brunette_mix="#7c664f",
    medium_brown="#6b3e2b",
    light_brown="#b68366",
    golden_brown="#d99d55",#Anya Golden Brown :)
    #Eyes
    hazel="#594c26",
    anya_gray="#b6b1b1",
    anya_grey_blue="#cce7ee",
    anya_grey_blue2="#c1d5e1",
    darkslategray="#28312f",
    #Misc
    pink_orange="#F68",
    ligher_purple="#C09",
    lips="#f08b83"
)
 
rgb = dict(
    #General
    blue=(0,0,255),
    white=(255,255,255),
    black=(0,0,0),
    red=(255,0,0),
    green=(0,255,0),
    dark_green=(0,155,0),
    redHalf=(255,0,0,0.5),
    greyLight=(204,204,204),
    greyMed=(102,102,102),
    greyDark=(50,50,50),
    pink=(255,20,147),
    #Hair Colors
    saddle_brown=(107,62,43),
    light_brown=(182,131,102),
    blonde=(238,222,196),
    angel_blonde=(179,163,147),
    brunette=(119,72,18),
    blonde_brunette_mix=(124,102,79),
    golden_brown=(217,157,85),
    #Eyes Colors
    hazel=(89,76,38),
    anya_grey=(182,177,177),
    anya_grey_blue=(204,231,238),
    anya_grey_blue2=(193,213,225),
    grey_eyes=(128,128,128),
    darkslategray=(40,49,47),
    green_eyes=(0,128,0),
    #Misc
    pinkish_orange=(255,102,136),
    lighter_purple=(204,0,153),
    lips=(240,139,131)
)
 
hs1 = dict(
   #General
    blue=(240,100,50),
    green=(120,100,25),
    grey=(0,0,50),
    #Hair Colors
    saddle_brown=(17,42,29),
    light_brown=(21,35,55),
    blonde=(37,55,85),
    angel_blonde=(30,17,63),
    brunette=(32,73,26),
    blonde_brunette_mix=(0,22,39),
    golden_brown=(32,63,59),
    #Eyes Colors
    hazel=(44,40,24),
    anya_grey=(0,3,70),
    anya_grey_blue=(192,50,86),
    anya_grey_blue2=(202,34,81),
    darkslategray=(166,10,17),
    #Misc
    pinkish_orange=(346,100,70),
    lighter_purple=(315,100,40),
    lips=(4,78,72)
)
 
x11 = dict(
 
)
 
def hex_to_rgb(value):#Credit to Jeremy Cantrell
    value = value.lstrip('#')
    lv = len(value)
    if lv == 1:
        v = int(value, 16)*17
        return v, v, v
    if lv == 3:
        return tuple(int(value[i:i+1], 16)*17 for i in range(0, 3))
    return tuple(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
 
def rgb_to_hex(rgb):#Credit to Jeremy Cantrell
    return '#%02x%02x%02x' % rgb
 
#Test
#print(str(hex["blue"]))
#print(str(rgb["blue"]))
#print(str(hs1["blue"]))
#print(str(hex_to_rgb("#f")))
#print(str(hex_to_rgb("#fff")))
#print(str(rgb_to_hex(rgb["lips"])))
#print(str(rgb_to_hex((255, 255, 255))))
 
 
"""
SOME OTHER EYE COLORS
887765
82745a
a6a390  #THIS is a nice grey for eye colors
"""

Comments