Vuo  0.8.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions

Description

A color, with component values specifying red, green, blue, and alpha (opacity).

Classes

struct  VuoColor
 A color, with component values specifying red, green, blue, and alpha (opacity). More...
 

Functions

VuoColor VuoColor_valueFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_object * VuoColor_jsonFromValue (const VuoColor value)
 Encodes value as a JSON object.
 
char * VuoColor_summaryFromValue (const VuoColor value)
 Returns a compact string representation of value (comma-separated components).
 
static VuoColor VuoColor_makeWithRGBA (VuoReal r, VuoReal g, VuoReal b, VuoReal a) __attribute__((const ))
 Returns a VuoColor with the given red, green, blue, alpha.
 
static void VuoColor_getRGBA (VuoColor color, VuoReal *r, VuoReal *g, VuoReal *b, VuoReal *a)
 Gets the red, green, blue, alpha of a color.
 
VuoColor VuoColor_makeWithHSLA (VuoReal h, VuoReal s, VuoReal l, VuoReal a)
 Returns a VuoColor with the given hue, saturation, lightness, alpha.
 
void VuoColor_getHSLA (VuoColor color, VuoReal *h, VuoReal *s, VuoReal *l, VuoReal *a)
 Gets the hue, saturation, lightness, hue, alpha of a color.
 
VuoColor VuoColor_average (VuoList_VuoColor colors)
 Returns the weighted (by alpha) average of colors.
 
VuoColor VuoColor_valueFromString (const char *str)
 Automatically generated function.
 
char * VuoColor_stringFromValue (const VuoColor value)
 Automatically generated function.
 
void VuoColor_retain (VuoColor value)
 Automatically generated function.
 
void VuoColor_release (VuoColor value)
 Automatically generated function.
 

Class Documentation

struct VuoColor
Class Members
float a
float b
float g
float r

Function Documentation

VuoColor VuoColor_average ( VuoList_VuoColor  colors)

Returns the weighted (by alpha) average of colors.

If there are no colors in the list, returns transparent black.

void VuoColor_getHSLA ( VuoColor  color,
VuoReal h,
VuoReal s,
VuoReal l,
VuoReal a 
)

Gets the hue, saturation, lightness, hue, alpha of a color.

Each value is in the range [0,1].

static void VuoColor_getRGBA ( VuoColor  color,
VuoReal r,
VuoReal g,
VuoReal b,
VuoReal a 
)
inlinestatic

Gets the red, green, blue, alpha of a color.

Each value is in the range [0,1], and specifies a color in the sRGB color space.

struct json_object * VuoColor_jsonFromValue ( const VuoColor  value)
read

Encodes value as a JSON object.

VuoColor VuoColor_makeWithHSLA ( VuoReal  h,
VuoReal  s,
VuoReal  l,
VuoReal  a 
)

Returns a VuoColor with the given hue, saturation, lightness, alpha.

Assumes each value is in the range [0,1].

static VuoColor VuoColor_makeWithRGBA ( VuoReal  r,
VuoReal  g,
VuoReal  b,
VuoReal  a 
) const
inlinestatic

Returns a VuoColor with the given red, green, blue, alpha.

Assumes each value is in the range [0,1], and specifies a color in the sRGB color space.

void VuoColor_release ( VuoColor  value)

Automatically generated function.

void VuoColor_retain ( VuoColor  value)

Automatically generated function.

char* VuoColor_stringFromValue ( const VuoColor  value)

Automatically generated function.

char * VuoColor_summaryFromValue ( const VuoColor  value)

Returns a compact string representation of value (comma-separated components).

VuoColor VuoColor_valueFromJson ( json_object *  js)

Decodes the JSON object js to create a new value.

Example:
{
"r" : 0.5,
"g" : 1,
"b" : 0,
"a" : 1
}
VuoColor VuoColor_valueFromString ( const char *  str)

Automatically generated function.