@staticmethod
def _rgb_to_rgbw(color):
    """
        Convert a RGB color to a RGBW color.

        :param color: The RGB color.
        :return: The RGBW color.
        """
    max_value = max(color)
    if max_value == 0:
        return [0] * 4
    multiplier = 255 / max_value
    hue_red = color.R * multiplier
    hue_green = color.G * multiplier
    hue_blue = color.B * multiplier
    max_hue = max(hue_red, hue_green, hue_blue)
    min_hue = min(hue_red, hue_green, hue_blue)
    luminance = ((max_hue + min_hue) / 2 - 127.5) * 2 / multiplier
    r = max(0, min(255, int(color.R - luminance)))
    g = max(0, min(255, int(color.G - luminance)))
    b = max(0, min(255, int(color.B - luminance)))
    w = max(0, min(255, int(luminance)))
    return [r, g, b, w]
