Class ExtendedColor
java.lang.Object
com.flarerobotics.lib.subsystem.led.ExtendedColor
A wrapper class that provides conversions between RGB values and HSV values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal edu.wpi.first.wpilibj.util.Color
The base Color object. -
Constructor Summary
ConstructorsConstructorDescriptionExtendedColor
(edu.wpi.first.wpilibj.util.Color color) Creates a new ExtendedColor. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
blue()
Gets the blue value of the color.final int
green()
Gets the green value of the color.final int
hue()
Gets the hue of the color.final int
red()
Gets the red value of the color.final int
Gets the saturation of the color.final int
value()
Gets the value of the color.
-
Field Details
-
m_color
public final edu.wpi.first.wpilibj.util.Color m_colorThe base Color object.
-
-
Constructor Details
-
ExtendedColor
public ExtendedColor(edu.wpi.first.wpilibj.util.Color color) Creates a new ExtendedColor.- Parameters:
color
- TheColor
object to wrap.
-
-
Method Details
-
hue
public final int hue()Gets the hue of the color.- Returns:
- The hue, from 0-180.
-
saturation
public final int saturation()Gets the saturation of the color.- Returns:
- The saturation, from 0-255
-
value
public final int value()Gets the value of the color.- Returns:
- The value, from 0-255
-
red
public final int red()Gets the red value of the color.- Returns:
- The red value, from 0-255
-
green
public final int green()Gets the green value of the color.- Returns:
- The green value, from 0-255
-
blue
public final int blue()Gets the blue value of the color.- Returns:
- The blue value, from 0-255
-