summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/rgb.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/sys/rgb.h')
-rw-r--r--usr/src/uts/common/sys/rgb.h35
1 files changed, 31 insertions, 4 deletions
diff --git a/usr/src/uts/common/sys/rgb.h b/usr/src/uts/common/sys/rgb.h
index 9ddfaa9e3f..6e0ba29af2 100644
--- a/usr/src/uts/common/sys/rgb.h
+++ b/usr/src/uts/common/sys/rgb.h
@@ -23,6 +23,13 @@ extern "C" {
#endif
/*
+ * Number of "base" colors is 16, 8 dark and 8 bright/light.
+ * Color map size for indexed colors is 256, to support VGA 256-color modes.
+ */
+#define NCOLORS 16
+#define NCMAP 256
+
+/*
* Color data from bootloader.
*/
typedef struct rgb_color {
@@ -37,9 +44,9 @@ typedef struct rgb {
} rgb_t;
typedef struct {
- uint8_t red[16];
- uint8_t green[16];
- uint8_t blue[16];
+ uint8_t red[NCOLORS];
+ uint8_t green[NCOLORS];
+ uint8_t blue[NCOLORS];
} text_cmap_t;
extern const text_cmap_t cmap4_to_24;
@@ -67,10 +74,30 @@ typedef enum pc_colors {
pc_brt_white = 15
} pc_colors_t;
+typedef enum sun_colors {
+ sun_brt_white = 0,
+ sun_black = 1,
+ sun_blue = 2,
+ sun_green = 3,
+ sun_cyan = 4,
+ sun_red = 5,
+ sun_magenta = 6,
+ sun_brown = 7,
+ sun_white = 8,
+ sun_grey = 9,
+ sun_brt_blue = 10,
+ sun_brt_green = 11,
+ sun_brt_cyan = 12,
+ sun_brt_red = 13,
+ sun_brt_magenta = 14,
+ sun_yellow = 15,
+} sun_colors_t;
+
#define XLATE_NCOLORS 8
extern const uint8_t dim_xlate[XLATE_NCOLORS];
extern const uint8_t brt_xlate[XLATE_NCOLORS];
-extern const uint8_t solaris_color_to_pc_color[16];
+extern const uint8_t solaris_color_to_pc_color[NCOLORS];
+extern const uint8_t pc_color_to_solaris_color[NCOLORS];
extern uint32_t rgb_color_map(const rgb_t *, uint8_t);