about summary refs log tree commit diff stats
path: root/termbox/termbox.h
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-05 16:03:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-05 16:03:54 -0700
commit10a3b8cca2bc7b2d5871577ba260ad75c65672b4 (patch)
tree7c03594c0f38b180c91c6445b790225138727857 /termbox/termbox.h
parent70023f592fd18a7497341476789f6e13eb909953 (diff)
downloadmu-10a3b8cca2bc7b2d5871577ba260ad75c65672b4.tar.gz
1530 - switch to termbox's 256-color mode
Diffstat (limited to 'termbox/termbox.h')
-rw-r--r--termbox/termbox.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/termbox/termbox.h b/termbox/termbox.h
index ac31230a..9b7fd772 100644
--- a/termbox/termbox.h
+++ b/termbox/termbox.h
@@ -11,20 +11,13 @@ extern "C" {
 /* The screen is a 2D array of cells. */
 struct tb_cell {
   uint32_t ch;  /* unicode character */
-  uint16_t fg;  /* foreground color and attributes */
-  uint16_t bg;  /* background color and attributes */
+  uint16_t fg;  /* foreground color (0-255) and attributes */
+  uint16_t bg;  /* background color (0-255) and attributes */
 };
 
-/* Possible colors in tb_cell.fg and tb_cell.bg. */
-#define TB_DEFAULT 0x00
-#define TB_BLACK   0x01
-#define TB_RED     0x02
-#define TB_GREEN   0x03
-#define TB_YELLOW  0x04
-#define TB_BLUE    0x05
-#define TB_MAGENTA 0x06
-#define TB_CYAN    0x07
-#define TB_WHITE   0x08
+/* Names for some colors in tb_cell.fg and tb_cell.bg. */
+#define TB_BLACK 232
+#define TB_WHITE 255
 
 /* Colors in tb_cell can be combined using bitwise-OR with multiple
  * of the following attributes. */