Exemplo n.º 1
0
def test_color_rgba_from_tuple():
    expected_result = """{
    "rgba": [
        100,
        200,
        255,
        255
    ]
}"""
    tc = Color.from_tuple((100, 200, 255))
    assert repr(tc) == expected_result
Exemplo n.º 2
0
def test_color_rgbaf_from_tuple():
    expected_result = """{
    "rgbaf": [
        0.127568,
        0.566949,
        0.550556,
        1.0
    ]
}"""
    tc = Color.from_tuple((0.127568, 0.566949, 0.550556, 1.0))
    assert repr(tc) == expected_result