List of all members
clan::Color Class Reference
clanDisplay 2D

Color description class. More...

`#include <color.h>`

Inheritance diagram for clan::Color:

## Public Member Functions
Construction
| Color ()
| Constructs a color. More...
| Color (const Colorf &)
| Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
| Constructs a color. More...
| Color (const std::string &hexstr)
| Constructs a color. More...
Attributes
unsigned char | get_alpha () const
| Returns the alpha color component, in the range 0-255. More...
unsigned char | get_red () const
| Returns the red color component, in the range 0-255. More...
unsigned char | get_green () const
| Returns the green color component, in the range 0-255. More...
unsigned char | get_blue () const
| Returns the blue color component, in the range 0-255. More...
float | get_alpha_f () const
| Returns the alpha color component, in the range 0-1. More...
float | get_red_f () const
| Returns the red color component, in the range 0-1. More...
float | get_green_f () const
| Returns the green color component, in the range 0-1. More...
float | get_blue_f () const
| Returns the blue color component, in the range 0-1. More...
unsigned int | get_argb8 () const
| Returns the color in ARGB8888 format. More...
unsigned int | get_abgr8 () const
| Returns the color in ABGR8888 format. More...
unsigned int | get_rgba8 () const
| Returns the color in RGBA8888 format. More...
unsigned int | get_bgra8 () const
| Returns the color in BGRA8888 format. More...
bool | operator== (const Color &c) const
| Color == Color operator (deep compare) More...
bool | operator!= (const Color &c) const
| Color != Color operator (deep compare) More...
Operations
void | set_alpha (unsigned char value)
| Set alpha color component, in the range 0-255. More...
void | set_red (unsigned char value)
| Set red color component, in the range 0-255. More...
void | set_green (unsigned char value)
| Set green color component, in the range 0-255. More...
void | set_blue (unsigned char value)
| Set blue color component, in the range 0-255. More...
void | set_alpha_f (float value)
| Set alpha color component, in the range 0-1. More...
void | set_red_f (float value)
| Set red color component, in the range 0-1. More...
void | set_green_f (float value)
| Set green color component, in the range 0-1. More...
void | set_blue_f (float value)
| Set blue color component, in the range 0-1. More...
void | set_color (unsigned char new_red, unsigned char new_green, unsigned char new_blue, unsigned char new_alpha=255)
| Set color based on rgba color components in the range 0-255. More...
void | set_rgba8 (unsigned int color)
| Set color based on rgba color components. More...
void | set_bgra8 (unsigned int color)
| Set color based on rgba color components. More...
void | set_rgb8 (unsigned int color)
| Set color based on rgb color components. Alpha is set to 255. More...
void | set_argb8 (unsigned int color)
| Set color based on argb color components. More...
void | set_colorf (float new_red, float new_green, float new_blue, float new_alpha=1.0f)
| Set color based on rgba color components in the range 0-1. More...
Public Member Functions inherited from clan::Vec4< Type >
| Vec4 ()
| Vec4 (const Type &scalar)
| Vec4 (const Vec2< Type > &copy, const Type &p3, const Type &p4)
| Vec4 (const Vec2< Type > &copy, const Vec2< Type > &copy34)
| Vec4 (const Vec3< Type > &copy, const Type &p4)
| Vec4 (const Type &p1, const Type &p2, const Type &p3, const Type &p4)
| Vec4 (const Type &p1, const Type &p2, const Vec2< Type > &copy34)
| Vec4 (const Type *array_xyzw)
template<>
double | length3 () const
template<>
float | length3 () const
template<>
double | length4 () const
template<>
float | length4 () const
void | set_xy (const Vec2< Type > &new_v)
void | set_zw (const Vec2< Type > &new_v)
*Type | length3 () const
| Returns the length (magnitude) of this vector (not taking into account the w ordinate). More...
*Type | length4 () const
| Returns the length (magnitude) of this vector (taking into account the w ordinate). More...
Vec4< Type > & | normalize3 ()
| Normalizes this vector (not taking into account the w ordinate) More...
Vec4< Type > & | normalize4 ()
| Normalizes this vector (taking into account the w ordinate) More...
Type | dot3 (const Vec4< Type > &vector) const
| Dot products this vector with an other vector (not taking into account the w ordinate). More...
Type | dot4 (const Vec4< Type > &vector) const
| Dot products this vector with an other vector (taking into account the w ordinate). More...
Angle | angle3 (const Vec4< Type > &vector) const
| Calculate the angle between this vector and an other vector (not taking into account the w ordinate). More...
Type | distance3 (const Vec4< Type > &vector) const
| Calculate the distance between this vector and an other vector (not taking into account the w ordinate). More...
Type | distance4 (const Vec4< Type > &vector) const
| Calculate the distance between this vector and an other vector (taking into account the w ordinate). More...
Vec4< Type > & | cross3 (const Vec4< Type > &vector)
| Calculate the cross product between this vector and an other vector (not taking into account the w ordinate). More...
Vec4< Type > & | rotate3 (const Angle &angle, const Vec4< Type > &axis)
| Rotate this vector around an axis. Same as glRotate[f|d](angle, a);. More...
Vec4< Type > & | round ()
| Rounds all components on this vector. More...
bool | is_equal (const Vec4< Type > &other, Type epsilon) const
| Returns true if equal within the bounds of an epsilon. More...
void | operator+= (const Vec4< Type > &vector)
| += operator. More...
void | operator+= (Type value)
| += operator. More...
void | operator-= (const Vec4< Type > &vector)
| -= operator. More...
void | operator-= (Type value)
| -= operator. More...
Vec4< Type > | operator- () const
| operator. More...
void | operator*= (const Vec4< Type > &vector)
| *= operator. More...
void | operator*= (Type value)
| *= operator. More...
void | operator/= (const Vec4< Type > &vector)
| /= operator. More...
void | operator/= (Type value)
| /= operator. More...
Vec4< Type > & | operator= (const Vec4< Type > &vector)
| = operator. More...
bool | operator== (const Vec4< Type > &vector) const
| == operator. More...
bool | operator!= (const Vec4< Type > &vector) const
| != operator. More...
bool | operator< (const Vec4< Type > &vector) const
| < operator. More...

## Statics
static Color | aliceblue
static Color | antiquewhite
static Color | aqua
static Color | aquamarine
static Color | azure
static Color | beige
static Color | bisque
static Color | black
static Color | blanchedalmond
static Color | blue
static Color | blueviolet
static Color | brown
static Color | burlywood
static Color | cadetblue
static Color | chartreuse
static Color | chocolate
static Color | coral
static Color | cornflowerblue
static Color | cornsilk
static Color | crimson
static Color | cyan
static Color | darkblue
static Color | darkcyan
static Color | darkgoldenrod
static Color | darkgray
static Color | darkgreen
static Color | darkgrey
static Color | darkkhaki
static Color | darkmagenta
static Color | darkolivegreen
static Color | darkorange
static Color | darkorchid
static Color | darkred
static Color | darksalmon
static Color | darkseagreen
static Color | darkslateblue
static Color | darkslategray
static Color | darkslategrey
static Color | darkturquoise
static Color | darkviolet
static Color | deeppink
static Color | deepskyblue
static Color | dimgray
static Color | dimgrey
static Color | dodgerblue
static Color | firebrick
static Color | floralwhite
static Color | forestgreen
static Color | fuchsia
static Color | gainsboro
static Color | ghostwhite
static Color | gold
static Color | goldenrod
static Color | gray
static Color | grey
static Color | green
static Color | greenyellow
static Color | honeydew
static Color | hotpink
static Color | indianred
static Color | indigo
static Color | ivory
static Color | khaki
static Color | lavender
static Color | lavenderblush
static Color | lawngreen
static Color | lemonchiffon
static Color | lightblue
static Color | lightcoral
static Color | lightcyan
static Color | lightgoldenrodyellow
static Color | lightgray
static Color | lightgreen
static Color | lightgrey
static Color | lightpink
static Color | lightsalmon
static Color | lightseagreen
static Color | lightskyblue
static Color | lightslategray
static Color | lightslategrey
static Color | lightsteelblue
static Color | lightyellow
static Color | lime
static Color | limegreen
static Color | linen
static Color | magenta
static Color | maroon
static Color | mediumaquamarine
static Color | mediumblue
static Color | mediumorchid
static Color | mediumpurple
static Color | mediumseagreen
static Color | mediumslateblue
static Color | mediumspringgreen
static Color | mediumturquoise
static Color | mediumvioletred
static Color | midnightblue
static Color | mintcream
static Color | mistyrose
static Color | moccasin
static Color | navajowhite
static Color | navy
static Color | oldlace
static Color | olive
static Color | olivedrab
static Color | orange
static Color | orangered
static Color | orchid
static Color | palegoldenrod
static Color | palegreen
static Color | paleturquoise
static Color | palevioletred
static Color | papayawhip
static Color | peachpuff
static Color | peru
static Color | pink
static Color | plum
static Color | powderblue
static Color | purple
static Color | red
static Color | rosybrown
static Color | royalblue
static Color | saddlebrown
static Color | salmon
static Color | sandybrown
static Color | seagreen
static Color | seashell
static Color | sienna
static Color | silver
static Color | skyblue
static Color | slateblue
static Color | slategray
static Color | slategrey
static Color | snow
static Color | springgreen
static Color | steelblue
static Color | tan
static Color | teal
static Color | thistle
static Color | tomato
static Color | turquoise
static Color | violet
static Color | wheat
static Color | white
static Color | whitesmoke
static Color | yellow
static Color | yellowgreen
static Color | transparent
| rgba(0, 0, 0, 0). More...
static Color | gray10
static Color | gray20
static Color | gray30
static Color | gray40
static Color | gray50
static Color | gray60
static Color | gray70
static Color | gray80
static Color | gray90
static Color | find_color (const std::string &name)
| Find and returns the static color matching a string. More...
static std::vector< std::string > & | get_names ()
| Returns the names of static colors defined. More...

## Additional Inherited Members
Public Types inherited from clan::Vec4< Type >
typedef Type | datatype
Static Public Member Functions inherited from clan::Vec4< Type >
static Vec4< Type > | cross3 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Calculate the cross product between two vectors (not taking into account the w ordinate). More...
static Type | dot3 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Dot products between two vectors (not taking into account the w ordinate). More...
static Type | dot4 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Dot products between two vectors (taking into account the w ordinate). More...
static bool | is_equal (const Vec4< Type > &first, const Vec4< Type > &second, Type epsilon)
| Returns true if equal within the bounds of an epsilon. More...
static Vec4< Type > | normalize3 (const Vec4< Type > &vector)
| Normalizes a vector (not taking into account the w ordinate) More...
static Vec4< Type > | normalize4 (const Vec4< Type > &vector)
| Normalizes a vector (taking into account the w ordinate) More...
static Vec4< Type > | rotate3 (const Vec4< Type > &vector, const Angle &angle, const Vec4< Type > &axis)
| Rotate a vector around an axis. Same as glRotate[f|d](angle, a);. More...
static Vec4< Type > | round (const Vec4< Type > &vector)
| Rounds all components on a vector. More...
Public Attributes inherited from clan::Vec4< Type >
union {
Type clan::Vec4< Type >::r
Type clan::Vec4< Type >::s
Type clan::Vec4< Type >::x
}; |
union {
Type clan::Vec4< Type >::g
Type clan::Vec4< Type >::t
Type clan::Vec4< Type >::y
}; |
union {
Type clan::Vec4< Type >::b
Type clan::Vec4< Type >::u
Type clan::Vec4< Type >::z
}; |
union {
Type clan::Vec4< Type >::a
Type clan::Vec4< Type >::v
Type clan::Vec4< Type >::w
}; |

## Detailed Description

Color description class.

The documentation for this class was generated from the following file:

- color.h