Classes | Enumerations | Functions
color_util Namespace Reference

Classes

struct  ColorHSVA
 
struct  ColorHSVA24
 
struct  ColorRGBA
 
struct  ColorRGBA24
 
struct  GenericColorHSVA
 
struct  GenericColorRGBA
 

Enumerations

enum  NamedColor {
  NamedColor::TRANSPARENT, NamedColor::RED, NamedColor::GREEN, NamedColor::YELLOW,
  NamedColor::BLUE, NamedColor::ORANGE, NamedColor::PURPLE, NamedColor::CYAN,
  NamedColor::MAGENTA, NamedColor::LIME, NamedColor::PINK, NamedColor::TEAL,
  NamedColor::LAVENDER, NamedColor::BROWN, NamedColor::MAROON, NamedColor::MINT,
  NamedColor::OLIVE, NamedColor::NAVY, NamedColor::GREY, NamedColor::LIGHT_RED,
  NamedColor::LIGHT_GREEN, NamedColor::LIGHT_YELLOW, NamedColor::LIGHT_BLUE, NamedColor::LIGHT_ORANGE,
  NamedColor::LIGHT_PURPLE, NamedColor::LIGHT_CYAN, NamedColor::LIGHT_MAGENTA, NamedColor::LIGHT_LIME,
  NamedColor::LIGHT_PINK, NamedColor::LIGHT_TEAL, NamedColor::LIGHT_LAVENDER, NamedColor::LIGHT_BROWN,
  NamedColor::LIGHT_MAROON, NamedColor::LIGHT_MINT, NamedColor::LIGHT_OLIVE, NamedColor::LIGHT_NAVY,
  NamedColor::LIGHT_GREY, NamedColor::DARK_RED, NamedColor::DARK_GREEN, NamedColor::DARK_YELLOW,
  NamedColor::DARK_BLUE, NamedColor::DARK_ORANGE, NamedColor::DARK_PURPLE, NamedColor::DARK_CYAN,
  NamedColor::DARK_MAGENTA, NamedColor::DARK_LIME, NamedColor::DARK_PINK, NamedColor::DARK_TEAL,
  NamedColor::DARK_LAVENDER, NamedColor::DARK_BROWN, NamedColor::DARK_MAROON, NamedColor::DARK_MINT,
  NamedColor::DARK_OLIVE, NamedColor::DARK_NAVY, NamedColor::DARK_GREY
}
 

Functions

color_util::ColorHSVA changeColorspace (const color_util::ColorRGBA &rgba)
 
color_util::ColorHSVA24 changeColorspace (const color_util::ColorRGBA24 &rgba)
 
color_util::ColorRGBA changeColorspace (const color_util::ColorHSVA &hsva)
 
color_util::ColorRGBA24 changeColorspace (const color_util::ColorHSVA24 &hsva)
 
const ColorRGBA24get (const NamedColor &name)
 
const std::vector< ColorRGBA24 > & getNamedColors ()
 
template<typename hsva >
hsva hueBlend (const hsva &color_a, const hsva &color_b, double ratio)
 Return a color that is a linear blending of color_a and color_b in hsv space. More...
 
color_util::ColorHSVA hueBlendPlus (const color_util::ColorHSVA &color_a, const color_util::ColorHSVA &color_b, double ratio)
 Return a color that blends color_a and color_b in hsv space, using the shortest distance between the hues. More...
 
template<typename rgba >
rgba rgbaBlend (const rgba &color_a, const rgba &color_b, double ratio)
 Return a color that is a linear blending of color_a and color_b in rgba space. More...
 
float toFloat (unsigned char n)
 
color_util::ColorRGBA toFloat (const color_util::ColorRGBA24 &int_color)
 
color_util::ColorHSVA toFloat (const color_util::ColorHSVA24 &int_color)
 
color_util::ColorRGBA24 toInt (const color_util::ColorRGBA &float_color)
 
color_util::ColorHSVA24 toInt (const color_util::ColorHSVA &float_color)
 
unsigned char toInt (float n)
 
std_msgs::ColorRGBA toMsg (const color_util::ColorRGBA &rgba)
 
std_msgs::ColorRGBA toMsg (const color_util::ColorRGBA24 &rgba)
 
std_msgs::ColorRGBA toMsg (const color_util::ColorHSVA &hsva)
 
std_msgs::ColorRGBA toMsg (const color_util::ColorHSVA24 &hsva)
 

Enumeration Type Documentation

Enumerator
TRANSPARENT 
RED 
GREEN 
YELLOW 
BLUE 
ORANGE 
PURPLE 
CYAN 
MAGENTA 
LIME 
PINK 
TEAL 
LAVENDER 
BROWN 
MAROON 
MINT 
OLIVE 
NAVY 
GREY 
LIGHT_RED 
LIGHT_GREEN 
LIGHT_YELLOW 
LIGHT_BLUE 
LIGHT_ORANGE 
LIGHT_PURPLE 
LIGHT_CYAN 
LIGHT_MAGENTA 
LIGHT_LIME 
LIGHT_PINK 
LIGHT_TEAL 
LIGHT_LAVENDER 
LIGHT_BROWN 
LIGHT_MAROON 
LIGHT_MINT 
LIGHT_OLIVE 
LIGHT_NAVY 
LIGHT_GREY 
DARK_RED 
DARK_GREEN 
DARK_YELLOW 
DARK_BLUE 
DARK_ORANGE 
DARK_PURPLE 
DARK_CYAN 
DARK_MAGENTA 
DARK_LIME 
DARK_PINK 
DARK_TEAL 
DARK_LAVENDER 
DARK_BROWN 
DARK_MAROON 
DARK_MINT 
DARK_OLIVE 
DARK_NAVY 
DARK_GREY 

Definition at line 43 of file named_colors.h.

Function Documentation

color_util::ColorHSVA color_util::changeColorspace ( const color_util::ColorRGBA rgba)

Definition at line 92 of file convert.cpp.

color_util::ColorHSVA24 color_util::changeColorspace ( const color_util::ColorRGBA24 rgba)

Definition at line 145 of file convert.cpp.

color_util::ColorRGBA color_util::changeColorspace ( const color_util::ColorHSVA hsva)

Definition at line 150 of file convert.cpp.

color_util::ColorRGBA24 color_util::changeColorspace ( const color_util::ColorHSVA24 hsva)

Definition at line 213 of file convert.cpp.

const ColorRGBA24& color_util::get ( const NamedColor name)
inline

Definition at line 173 of file named_colors.h.

const std::vector<ColorRGBA24>& color_util::getNamedColors ( )
inline

Definition at line 105 of file named_colors.h.

template<typename hsva >
hsva color_util::hueBlend ( const hsva &  color_a,
const hsva &  color_b,
double  ratio 
)
inline

Return a color that is a linear blending of color_a and color_b in hsv space.

Parameters
color_a
color_b
ratiovalue in range [0.0, 1.0]
Returns
color_a * (1 - ratio) + color_b * ratio

Definition at line 74 of file blend.h.

color_util::ColorHSVA color_util::hueBlendPlus ( const color_util::ColorHSVA color_a,
const color_util::ColorHSVA color_b,
double  ratio 
)
inline

Return a color that blends color_a and color_b in hsv space, using the shortest distance between the hues.

Note the shortest distance between the hues may wrap around 1.0

Only available in floating point because it assumes the hue is [0.0, 1.0]

Parameters
color_a
color_b
ratiovalue in range [0.0, 1.0]
Returns
blend between color_a and color_b

Definition at line 101 of file blend.h.

template<typename rgba >
rgba color_util::rgbaBlend ( const rgba &  color_a,
const rgba &  color_b,
double  ratio 
)
inline

Return a color that is a linear blending of color_a and color_b in rgba space.

Parameters
color_a
color_b
ratiovalue in range [0.0, 1.0]
Returns
color_a * (1 - ratio) + color_b * ratio

Definition at line 51 of file blend.h.

float color_util::toFloat ( unsigned char  n)
inline

Definition at line 40 of file convert.cpp.

color_util::ColorRGBA color_util::toFloat ( const color_util::ColorRGBA24 int_color)

Definition at line 45 of file convert.cpp.

color_util::ColorHSVA color_util::toFloat ( const color_util::ColorHSVA24 int_color)

Definition at line 55 of file convert.cpp.

color_util::ColorRGBA24 color_util::toInt ( const color_util::ColorRGBA float_color)

Definition at line 70 of file convert.cpp.

color_util::ColorHSVA24 color_util::toInt ( const color_util::ColorHSVA float_color)

Definition at line 80 of file convert.cpp.

unsigned char color_util::toInt ( float  n)
inline

Definition at line 65 of file convert.cpp.

std_msgs::ColorRGBA color_util::toMsg ( const color_util::ColorRGBA rgba)

Definition at line 218 of file convert.cpp.

std_msgs::ColorRGBA color_util::toMsg ( const color_util::ColorRGBA24 rgba)

Definition at line 228 of file convert.cpp.

std_msgs::ColorRGBA color_util::toMsg ( const color_util::ColorHSVA hsva)

Definition at line 233 of file convert.cpp.

std_msgs::ColorRGBA color_util::toMsg ( const color_util::ColorHSVA24 hsva)

Definition at line 238 of file convert.cpp.



color_util
Author(s):
autogenerated on Sun Jan 10 2021 04:08:24