def rgba_tuple(rgba):
    """
    Ensures RGB(A) tuples in the range 0-1 are scaled to 0-255.
    """
    if isinstance(rgba, tuple):
        return tuple(int(c*255) if i<3 else c for i, c in enumerate(rgba))
    else:
        return COLOR_ALIASES.get(rgba, rgba)
def rgba_tuple ( rgba ) : if isinstance ( rgba , tuple ) : return tuple ( int ( c * 255 ) if i < 3 else c for i , c in enumerate ( rgba ) ) else : return COLOR_ALIASES . get ( rgba , rgba )
Ensures RGB(A) tuples in the range 0-1 are scaled to 0-255.