:py:mod:`phoenix6.signals.rgbw_color` ===================================== .. py:module:: phoenix6.signals.rgbw_color Module Contents --------------- Attributes ~~~~~~~~~~ .. autoapisummary:: phoenix6.signals.rgbw_color.USE_WPILIB .. py:data:: USE_WPILIB :value: True .. py:class:: RGBWColor RGBWColor(red: int, green: int, blue: int, white: int = 0) Represents an RGBW color that can be applied to an LED. .. py:property:: red :type: int The red component of the color, within [0, 255]. .. py:property:: green :type: int The green component of the color, within [0, 255]. .. py:property:: blue :type: int The blue component of the color, within [0, 255]. .. py:property:: white :type: int The white component of the color, within [0, 255]. Note that not all LED strips support the white component. .. py:method:: from_hex(hex_str: str) -> RGBWColor | None :staticmethod: Creates a new RGBW color from the given hex string. :param hex_str: The color hex in the form "#RRGGBBWW" or "#RRGGBB". :type hex_str: str :returns: The color if the hex is valid, otherwise None :rtype: RGBWColor | None .. py:method:: from_hsv(h: phoenix6.units.degree, s: float, v: float) -> RGBWColor :staticmethod: Creates a new RGBW color from the given HSV color. :param h: The hue as an angle from [0, 360) deg, where 0 is red. :type h: degree :param s: The saturation as a scalar from [0, 1]. :type s: float :param v: The value as a scalar from [0, 1]. :type v: float :returns: The corresponding RGB color; the white component will be 0. :rtype: RGBWColor .. py:method:: to_hex_str() -> str Returns this RGBW color as a hex string. :returns: A hex string in the format "#RRGGBBWW" :rtype: str