BRL-CAD
color.h File Reference
#include "common.h"
#include "bu/defines.h"
#include "bu/magic.h"
Include dependency graph for color.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bu_color
 

Macros

#define RED   0
 
#define GRN   1
 
#define BLU   2
 
#define HUE   0
 
#define SAT   1
 
#define VAL   2
 
#define ACHROMATIC   -1.0
 
#define BU_COLOR_NULL   ((struct bu_color *) 0)
 
#define BU_CK_COLOR(_c)   BU_CKMAG(_c, BU_COLOR_MAGIC, "bu_color")
 
#define BU_COLOR_INIT(_c)
 
#define BU_COLOR_INIT_ZERO   { BU_COLOR_MAGIC, {0, 0, 0} }
 
#define BU_COLOR_IS_INITIALIZED(_c)   (((struct bu_color *)(_c) != BU_COLOR_NULL) && LIKELY((_c)->magic == BU_COLOR_MAGIC))
 

Typedefs

typedef struct bu_color bu_color_t
 

Functions

void bu_rgb_to_hsv (unsigned char *rgb, fastf_t *hsv)
 
int bu_hsv_to_rgb (fastf_t *hsv, unsigned char *rgb)
 
int bu_str_to_rgb (char *str, unsigned char *rgb)
 
int bu_color_from_rgb_floats (struct bu_color *cp, fastf_t *rgb)
 
int bu_color_to_rgb_floats (struct bu_color *cp, fastf_t *rgb)