Class ExtendedColor

java.lang.Object
com.flarerobotics.lib.subsystem.led.ExtendedColor

public class ExtendedColor extends Object
A wrapper class that provides conversions between RGB values and HSV values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final edu.wpi.first.wpilibj.util.Color
    The base Color object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExtendedColor(edu.wpi.first.wpilibj.util.Color color)
    Creates a new ExtendedColor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final int
    Gets the blue value of the color.
    final int
    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
    Gets the value of the color.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_color

      public final edu.wpi.first.wpilibj.util.Color m_color
      The base Color object.
  • Constructor Details

    • ExtendedColor

      public ExtendedColor(edu.wpi.first.wpilibj.util.Color color)
      Creates a new ExtendedColor.
      Parameters:
      color - The Color 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