#include <CanandcolorData.h>
Record class to hold detected color values.
◆ CanandcolorColorData()
constexpr redux::sensors::canandcolor::CanandcolorColorData::CanandcolorColorData |
( |
double |
red, |
|
|
double |
green, |
|
|
double |
blue, |
|
|
double |
white |
|
) |
| |
|
inlineconstexpr |
Constructor.
- Parameters
-
red | the amount of red detected between 0 to 1 |
green | the amount of green detected between 0 to 1 |
blue | the amount of blue detected between 0 to 1 |
white | the amount of white detected between 0 to 1 |
◆ Hue()
constexpr double redux::sensors::canandcolor::CanandcolorColorData::Hue |
( |
| ) |
|
|
inlineconstexpr |
Returns hue (0-1) in HSV colorspace.
- Returns
- hue
◆ Saturation()
constexpr double redux::sensors::canandcolor::CanandcolorColorData::Saturation |
( |
| ) |
|
|
inlineconstexpr |
Returns saturation (0-1) in HSV colorspace.
- Returns
- sat
◆ ToWpilibColor()
constexpr frc::Color redux::sensors::canandcolor::CanandcolorColorData::ToWpilibColor |
( |
| ) |
|
|
inlineconstexpr |
Converts to a WPILib frc::Color object.
- Returns
- a Color with the rgb value.
◆ Value()
constexpr double redux::sensors::canandcolor::CanandcolorColorData::Value |
( |
| ) |
|
|
inlineconstexpr |
Returns value (0-1) in HSV color space. Not to be confused with the white value
- Returns
- value
◆ blue
double redux::sensors::canandcolor::CanandcolorColorData::blue |
◆ green
double redux::sensors::canandcolor::CanandcolorColorData::green |
◆ red
double redux::sensors::canandcolor::CanandcolorColorData::red |
◆ white
double redux::sensors::canandcolor::CanandcolorColorData::white |
The documentation for this class was generated from the following file: