def test_rgb_tuple_from_str_english(): """Extract RGB(A) values as tuple from limited English color name strings""" assert rgb_tuple_from_str('red') == (255, 0, 0)
def test_rgb_tuple_from_str_rgba(): """Extract RGBA values as tuple from string RGBA color representation""" assert rgb_tuple_from_str('rgba(122,43,17,0.5)') == (122, 43, 17, 0.5)
def test_rgb_tuple_from_str_hex(): """Extract RGB(A) values as tuple from string HEX color representation""" assert rgb_tuple_from_str('#bada55') == (186, 218, 85)
def test_rgb_tuple_from_str(): """Extract RGB values as tuple from string RGB color representation""" assert rgb_tuple_from_str('rgb(122,43,17)') == (122, 43, 17)