Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
lab.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rgb_struct
 
struct  xyz_struct
 
struct  lab_struct
 

Typedefs

typedef struct rgb_struct color_rgb
 
typedef struct xyz_struct color_xyz
 
typedef struct lab_struct color_lab
 

Functions

color_xyz RGB2XYZ (color_rgb color)
 
color_rgb XYZ2RGB (color_xyz color)
 
color_lab RGB2LAB (color_rgb color)
 
void LAB2RGB_real_01 (double *color)
 
color_rgb LAB2RGB (color_lab color)
 
color_rgb color_rgb_init (double r, double g, double b)
 
color_xyz color_xyz_init (double x, double y, double z)
 
color_lab color_lab_init (double l, double a, double b)
 
QuadTree lab_gamut_quadtree (const int *lightness, int max_qtree_level)
 construct a quadtree of the LAB gamut points
 
double * lab_gamut (const int *lightness, int *n)
 
double * color_blend_rgb2lab (char *color_list, const int maxpoints)
 

Typedef Documentation

◆ color_lab

typedef struct lab_struct color_lab

Definition at line 26 of file lab.h.

◆ color_rgb

typedef struct rgb_struct color_rgb

Definition at line 16 of file lab.h.

◆ color_xyz

typedef struct xyz_struct color_xyz

Definition at line 21 of file lab.h.

Function Documentation

◆ color_blend_rgb2lab()

double * color_blend_rgb2lab ( char *  color_list,
const int  maxpoints 
)

derive around maxpoints from a color list

Parameters
color_listList of the form "#ff0000,#00ff00,..."
maxpointsMaximum number of points to return
Returns
An array of size [maxpoints*3] of the form {{l,a,b},...}

Definition at line 212 of file lab.c.

References lab_struct::a, rgb_struct::b, lab_struct::b, color_palettes_get(), free(), rgb_struct::g, gv_calloc(), lab_struct::l, lab_dist(), lab_interpolate(), MAX, NULL, rgb_struct::r, RGB2LAB(), and Verbose.

Referenced by node_distinct_coloring().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_lab_init()

color_lab color_lab_init ( double  l,
double  a,
double  b 
)

Definition at line 36 of file lab.c.

References lab_struct::a, lab_struct::b, and lab_struct::l.

Referenced by node_distinct_coloring_internal2(), and RGB2LAB().

Here is the caller graph for this function:

◆ color_rgb_init()

color_rgb color_rgb_init ( double  r,
double  g,
double  b 
)

Definition at line 23 of file lab.c.

References rgb_struct::b, rgb_struct::g, and rgb_struct::r.

Referenced by XYZ2RGB().

Here is the caller graph for this function:

◆ color_xyz_init()

color_xyz color_xyz_init ( double  x,
double  y,
double  z 
)

Definition at line 29 of file lab.c.

References xyz_struct::x, xyz_struct::y, xyz_struct::z, and z.

Referenced by LAB2RGB(), RGB2LAB(), and RGB2XYZ().

Here is the caller graph for this function:

◆ LAB2RGB()

color_rgb LAB2RGB ( color_lab  color)

Definition at line 87 of file lab.c.

References rgb_struct::b, color(), color_xyz_init(), xyz_struct::x, XYZ2RGB(), XYZEpsilon, XYZKappa, xyz_struct::y, xyz_struct::z, and z.

Referenced by LAB2RGB_real_01(), and node_distinct_coloring_internal2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LAB2RGB_real_01()

void LAB2RGB_real_01 ( double *  color)

Definition at line 74 of file lab.c.

References lab_struct::a, rgb_struct::b, lab_struct::b, color(), rgb_struct::g, lab_struct::l, LAB2RGB(), and rgb_struct::r.

Referenced by node_distinct_coloring_internal2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lab_gamut()

double * lab_gamut ( const int *  lightness,
int *  n 
)

give a list of n points in the file defining the LAB color gamut

Definition at line 144 of file lab.c.

References lab_gamut_data, lab_gamut_data_size, malloc(), PRISIZE_T, and Verbose.

Referenced by lab_gamut_quadtree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lab_gamut_quadtree()

QuadTree lab_gamut_quadtree ( const int *  lightness,
int  max_qtree_level 
)

Definition at line 186 of file lab.c.

References free(), lab_gamut(), NULL, and QuadTree_new_from_point_list().

Referenced by node_distinct_coloring().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RGB2LAB()

color_lab RGB2LAB ( color_rgb  color)

Definition at line 62 of file lab.c.

References A, B, color(), color_lab_init(), color_xyz_init(), L, MAX, PivotXYZ(), RGB2XYZ(), xyz_struct::x, xyz_struct::y, xyz_struct::z, and z.

Referenced by color_blend_rgb2lab(), and node_distinct_coloring_internal2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RGB2XYZ()

color_xyz RGB2XYZ ( color_rgb  color)

Definition at line 55 of file lab.c.

References color(), color_xyz_init(), and PivotRgb().

Referenced by RGB2LAB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XYZ2RGB()

color_rgb XYZ2RGB ( color_xyz  color)

Definition at line 112 of file lab.c.

References color(), color_rgb_init(), MAX, MIN, and z.

Referenced by LAB2RGB().

Here is the call graph for this function:
Here is the caller graph for this function: