code: 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)
docs: Ensures RGB(A) tuples in the range 0-1 are scaled to 0-255.