def relative_luminance(rgb)
      raise InvalidColorError, rgb unless valid_rgb?(rgb)

      srgb = rgb_to_srgba(rgb)
      srgb_lightness(srgb)
    end
def relative_luminance(rgb)
      raise InvalidColorError, rgb unless valid_rgb?(rgb)

      srgb = rgb_to_srgba(rgb)
      srgb_lightness(srgb)
    end
Calculate the relative luminance for an rgb color