Graphviz 16.1.2~dev.20261110.1602
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1
3/*************************************************************************
4 * Copyright (c) 2011 AT&T Intellectual Property
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v2.0
7 * which accompanies this distribution, and is available at
8 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
9 *
10 * Contributors: Details at https://graphviz.org
11 *************************************************************************/
12
13#pragma once
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct hsvrgbacolor_t {
20 char *name;
21 unsigned char h, s, v;
22 unsigned char r, g, b, a;
24
25/* possible representations of color in gvcolor_t */
34
35/* gvcolor_t can hold a color spec in a choice or representations */
36typedef struct color_s {
37 union {
38 double RGBA[4];
39 double HSVA[4];
40 unsigned char rgba[4];
41 int rrggbbaa[4];
42 char *string;
43 int index;
44 } u;
47
48#define COLOR_MALLOC_FAIL -1
49#define COLOR_UNKNOWN 1
50#define COLOR_OK 0
51
52#ifdef __cplusplus
53}
54#endif
color_type_t
Definition color.h:26
@ HSVA_DOUBLE
Definition color.h:27
@ RGBA_DOUBLE
Definition color.h:30
@ RGBA_WORD
Definition color.h:29
@ RGBA_BYTE
Definition color.h:28
@ COLOR_INDEX
Definition color.h:32
@ COLOR_STRING
Definition color.h:31
struct color_s gvcolor_t
int index
Definition color.h:43
char * string
Definition color.h:42
double RGBA[4]
Definition color.h:38
union color_s::@40 u
int rrggbbaa[4]
Definition color.h:41
double HSVA[4]
Definition color.h:39
unsigned char rgba[4]
Definition color.h:40
color_type_t type
Definition color.h:45
unsigned char h
Definition color.h:21
unsigned char a
Definition color.h:22
unsigned char b
Definition color.h:22
unsigned char g
Definition color.h:22
unsigned char s
Definition color.h:21
unsigned char v
Definition color.h:21
unsigned char r
Definition color.h:22
char * name
Definition color.h:20