2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2018 Toomas Soome <tsoome@me.com>
19 #include <sys/types.h>
26 * Number of "base" colors is 16, 8 dark and 8 bright/light.
27 * Color map size for indexed colors is 256, to support VGA 256-color modes.
33 * Color data from bootloader.
35 typedef struct rgb_color
{
46 extern rgb_t rgb_info
;
50 uint8_t green
[NCOLORS
];
51 uint8_t blue
[NCOLORS
];
54 extern const text_cmap_t cmap4_to_24
;
56 * ANSI color to sun color translation.
59 /* The pc color here is actually referring to standard 16 color VGA map. */
60 typedef enum pc_colors
{
79 typedef enum sun_colors
{
98 #define XLATE_NCOLORS 8
99 extern const uint8_t dim_xlate
[XLATE_NCOLORS
];
100 extern const uint8_t brt_xlate
[XLATE_NCOLORS
];
101 extern const uint8_t solaris_color_to_pc_color
[NCOLORS
];
102 extern const uint8_t pc_color_to_solaris_color
[NCOLORS
];
104 extern uint32_t rgb_to_color(const rgb_t
*, uint32_t, uint32_t, uint32_t,
106 extern uint32_t rgb_color_map(const rgb_t
*, uint8_t, uint8_t);
112 #endif /* _SYS_RGB_H */