color.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _COLOR_H
  2. #define _COLOR_H
  3. #include "misc.h"
  4. #define C_BLACK 1
  5. #define C_BLUE 2
  6. #define C_GREEN 3
  7. #define C_CYAN 4
  8. #define C_RED 5
  9. #define C_PURPLE 6
  10. #define C_BROWN 7
  11. #define C_LIGHTGREY 8
  12. #define C_DARKGREY 9
  13. #define C_LIGHTBLUE 10
  14. #define C_LIGHTGREEN 11
  15. #define C_LIGHTCYAN 12
  16. #define C_LIGHTRED 13
  17. #define C_LIGHTPURPLE 14
  18. #define C_YELLOW 15
  19. #define C_WHITE 16
  20. #define BOLD_OPEN 1
  21. #define BOLD_CLOSE 2
  22. #define UNDERLINE_OPEN 3
  23. #define UNDERLINE_CLOSE 4
  24. #define COLOR_OPEN 5
  25. #define COLOR_CLOSE 6
  26. #define FLASH_OPEN 7
  27. #define FLASH_CLOSE 8
  28. #define BLACK(idx) color(idx, COLOR_OPEN, C_BLACK)
  29. #define BLUE(idx) color(idx, COLOR_OPEN, C_BLUE)
  30. #define GREEN(idx) color(idx, COLOR_OPEN, C_GREEN)
  31. #define CYAN(idx) color(idx, COLOR_OPEN, C_CYAN)
  32. #define RED(idx) color(idx, COLOR_OPEN, C_RED)
  33. #define PURPLE(idx) color(idx, COLOR_OPEN, C_PURPLE)
  34. #define BROWN(idx) color(idx, COLOR_OPEN, C_BROWN)
  35. #define LIGHTGREY(idx) color(idx, COLOR_OPEN, C_LIGHTGREY)
  36. #define DARKGREY(idx) color(idx, COLOR_OPEN, C_DARKGREY)
  37. #define LIGHTBLUE(idx) color(idx, COLOR_OPEN, C_LIGHTBLUE)
  38. #define LIGHTGREEN(idx) color(idx, COLOR_OPEN, C_LIGHTGREEN)
  39. #define LIGHTCYAN(idx) color(idx, COLOR_OPEN, C_LIGHTCYAN)
  40. #define LIGHTRED(idx) color(idx, COLOR_OPEN, C_LIGHTRED)
  41. #define LIGHTPURPLE(idx) color(idx, COLOR_OPEN, C_LIGHTPURPLE)
  42. #define YELLOW(idx) color(idx, COLOR_OPEN, C_YELLOW)
  43. #define WHITE(idx) color(idx, COLOR_OPEN, C_WHITE)
  44. #define COLOR_END(idx) color(idx, COLOR_CLOSE, 0)
  45. #define BOLD(idx) color(idx, BOLD_OPEN, 0)
  46. #define BOLD_END(idx) color(idx, BOLD_CLOSE, 0)
  47. #define UNDERLINE(idx) color(idx, UNDERLINE_OPEN, 0)
  48. #define UNDERLINE_END(idx) color(idx, UNDERLINE_CLOSE, 0)
  49. #define FLASH(idx) color(idx, FLASH_OPEN, 0)
  50. #define FLASH_END(idx) color(idx, FLASH_CLOSE, 0)
  51. #endif /* !_COLOR_H */