def hex2rgb(hx):
    """
    transform 6-digit hex number into [r,g,b] integers

    :param hx:
    :return:
    """
    assert len(hx) == 6
    rgb = []
    for r in range(3):
        ss = "0x" + hx[2 * r: 2 * r + 2]
        rr = int(ss, 16)
        rgb.append(rr)
    return rgb