Advertisement
Phr0zen_Penguin

myColor.h

Nov 23rd, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.84 KB | None | 0 0
  1. /*============================================================================
  2.   ----------------------------------------------------------------------------
  3.   myColor.h - Custom color definitions for console text coloring.
  4.         (c) Damion 'Phr0z3n.Dev' Tapper, 2013.
  5.         Email: Phr0z3n.Dev@Gmail.com
  6.  
  7.   NOTE: These are basic RGB color definitions (recommended for console coloring
  8.     only).  For more sophisticated color mixing for Windows painting and GUI
  9.     design, please refer to your compiler's/IDE's manual for HEX (RRGGBB)
  10.     color values/definitions.
  11.  
  12.     Also, black will not be defined because the text remains black if left
  13.     unaltered.
  14.   ----------------------------------------------------------------------------
  15.   ============================================================================*/
  16.  
  17. /*============================================================================
  18.             FOREGROUND COLOR DEFINITIONS
  19.   ============================================================================*/
  20. /*=====================================--=====================================
  21.                 RGB COLOR DEFINITIONS
  22.   ----------------------------------------------------------------------------*/
  23. #define F_RED       0x0004
  24. #define F_GREEN     0x0002
  25. #define F_BLUE      0x0001
  26. #define F_INTENSE   0x0008
  27.  
  28. #define FOREGROUND_INTENSE_RED      F_RED | F_INTENSE
  29. #define F_INTENSE_RED           FOREGROUND_INTENSE_RED
  30.  
  31. #define FOREGROUND_INTENSE_GREEN    F_GREEN | F_INTENSE
  32. #define F_INTENSE_GREEN         FOREGROUND_INTENSE_GREEN
  33.  
  34. #define FOREGROUND_INTENSE_BLUE     F_BLUE | F_INTENSE
  35. #define F_INTENSE_BLUE          FOREGROUND_INTENSE_BLUE
  36.  
  37. /*=====================================--=====================================
  38.                 CMYW COLOR DEFINITIONS
  39.   ----------------------------------------------------------------------------*/
  40. #define FOREGROUND_CYAN         F_GREEN | F_BLUE
  41. #define F_CYAN              FOREGROUND_CYAN
  42.  
  43. #define FOREGROUND_INTENSE_CYAN     F_GREEN | F_BLUE | F_INTENSE
  44. #define F_INTENSE_CYAN          FOREGROUND_INTENSE_CYAN
  45.  
  46. #define FOREGROUND_MAGENTA      F_RED | F_BLUE
  47. #define F_MAGENTA           FOREGROUND_MAGENTA
  48.  
  49. #define FOREGROUND_INTENSE_MAGENTA  F_RED | F_BLUE | F_INTENSE
  50. #define F_INTENSE_MAGENTA       FOREGROUND_INTENSE_MAGENTA
  51.  
  52. #define FOREGROUND_YELLOW       F_RED | F_GREEN
  53. #define F_YELLOW            FOREGROUND_YELLOW
  54.  
  55. #define FOREGROUND_INTENSE_YELLOW   F_RED | F_GREEN | F_INTENSE
  56. #define F_INTENSE_YELLOW        FOREGROUND_INTENSE_YELLOW
  57.  
  58. #define FOREGROUND_WHITE        F_RED | F_GREEN | F_BLUE
  59. #define F_WHITE             FOREGROUND_WHITE
  60.  
  61. #define FOREGROUND_INTENSE_WHITE    F_RED | F_GREEN | F_BLUE | F_INTENSE
  62. #define F_INTENSE_WHITE         FOREGROUND_INTENSE_WHITE
  63.  
  64. /*=====================================--=====================================
  65.             MONOCHROMATIC COLOR DEFINITIONS
  66.   ----------------------------------------------------------------------------*/
  67. #define FOREGROUND_GRAY         F_INTENSE
  68. #define F_GRAY              F_INTENSE
  69.  
  70.  
  71. /*============================================================================
  72.             BACKGROUND COLOR DEFINITIONS
  73.   ============================================================================*/
  74. /*=====================================--=====================================
  75.                 RGB COLOR DEFINITIONS
  76.   ----------------------------------------------------------------------------*/
  77. #define B_RED       0x0040
  78. #define B_GREEN     0x0020
  79. #define B_BLUE      0x0010
  80. #define B_INTENSE   0x0080
  81.  
  82. #define BACKGROUND_INTENSE_RED      B_RED | B_INTENSE
  83. #define B_INTENSE_RED           BACKGROUND_INTENSE_RED
  84.  
  85. #define BACKGROUND_INTENSE_GREEN    B_GREEN | B_INTENSE
  86. #define B_INTENSE_GREEN         BACKGROUND_INTENSE_GREEN
  87.  
  88. #define BACKGROUND_INTENSE_BLUE     B_BLUE | B_INTENSE
  89. #define B_INTENSE_BLUE          BACKGROUND_INTENSE_BLUE
  90.  
  91. /*=====================================--=====================================
  92.             CMYW COLOR DEFINITIONS
  93.   ----------------------------------------------------------------------------*/
  94. #define BACKGROUND_CYAN         B_GREEN | B_BLUE
  95. #define B_CYAN              BACKGROUND_CYAN
  96.  
  97. #define BACKGROUND_INTENSE_CYAN     B_GREEN | B_BLUE | B_INTENSE
  98. #define B_INTENSE_CYAN          BACKGROUND_INTENSE_CYAN
  99.  
  100. #define BACKGROUND_MAGENTA      B_RED | B_BLUE
  101. #define B_MAGENTA           BACKGROUND_MAGENTA
  102.  
  103. #define BACKGROUND_INTENSE_MAGENTA  B_RED | B_BLUE | B_INTENSE
  104. #define B_INTENSE_MAGENTA       BACKGROUND_INTENSE_MAGENTA
  105.  
  106. #define BACKGROUND_YELLOW       B_RED | B_GREEN
  107. #define B_YELLOW            BACKGROUND_YELLOW
  108.  
  109. #define BACKGROUND_INTENSE_YELLOW   B_RED | B_GREEN | B_INTENSE
  110. #define B_INTENSE_YELLOW        BACKGROUND_INTENSE_YELLOW
  111.  
  112. #define BACKGROUND_WHITE        B_RED | B_GREEN | B_BLUE
  113. #define B_WHITE             BACKGROUND_WHITE
  114.  
  115. #define BACKGROUND_INTENSE_WHITE    B_RED | B_GREEN | B_BLUE | B_INTENSE
  116. #define B_INTENSE_WHITE         BACKGROUND_INTENSE_WHITE
  117.  
  118. /*=====================================--=====================================
  119.             MONOCHROMATIC COLOR DEFINITIONS
  120.   ----------------------------------------------------------------------------*/
  121. #define BACKGROUND_GRAY         B_INTENSE
  122. #define B_GRAY              B_INTENSE
  123.  
  124.  
  125. /*=====================================--=====================================
  126.         CONSOLE COLOR ATTRIBUTES DEFINITIONS (EXAMPLES)
  127.   ============================================================================*/
  128. /*=====================================--=====================================
  129.             RGB ON BLUE ATTRIBUTES DEFINITIONS
  130.   ----------------------------------------------------------------------------*/
  131. #define RED_ON_BLUE         B_BLUE | F_RED
  132. #define INTENSE_RED_ON_BLUE     B_BLUE | F_INTENSE_RED
  133.  
  134. #define GREEN_ON_BLUE           B_BLUE | F_GREEN
  135. #define INTENSE_GREEN_ON_BLUE       B_BLUE | F_INTENSE_GREEN
  136.  
  137. #define BLUE_ON_BLUE            B_BLUE | F_BLUE     /* Highly unlikely. */
  138. #define INTENSE_BLUE_ON_BLUE        B_BLUE | F_INTENSE_BLUE
  139.  
  140. /*=====================================--=====================================
  141.             CMYW ON BLUE ATTRIBUTES DEFINITIONS
  142.   ----------------------------------------------------------------------------*/
  143. #define CYAN_ON_BLUE            B_BLUE | F_CYAN
  144. #define INTENSE_CYAN_ON_BLUE        B_BLUE | F_INTENSE_CYAN
  145.  
  146. #define MAGENTA_ON_BLUE         B_BLUE | F_MAGENTA
  147. #define INTENSE_MAGENTA_ON_BLUE     B_BLUE | F_INTENSE_MAGENTA
  148.  
  149. /* My favourite. */
  150. #define YELLOW_ON_BLUE          B_BLUE | F_YELLOW
  151. #define INTENSE_YELLOW_ON_BLUE      B_BLUE | F_INTENSE_YELLOW
  152.  
  153. #define WHITE_ON_BLUE           B_BLUE | F_WHITE
  154. #define INTENSE_WHITE_ON_BLUE       B_BLUE | F_INTENSE_WHITE
  155.  
  156. /*=====================================--=====================================
  157.         MONOCHROME ON BLUE ATTRIBUTES DEFINITIONS
  158.   ----------------------------------------------------------------------------*/
  159. #define GRAY_ON_BLUE            B_BLUE | F_GRAY
  160.  
  161. /*=====================================--=====================================
  162.             MISC ON MISC ATTRIBUTES DEFINITIONS
  163.   ----------------------------------------------------------------------------*/
  164. #define BLUE_ON_RED         B_RED   | F_BLUE
  165. #define RED_ON_WHITE            B_WHITE | F_RED
  166. #define BLUE_ON_YELLOW          B_YELLOW | F_BLUE
  167. #define BLUE_ON_WHITE           B_WHITE | F_BLUE
  168. #define INTENSE_YELLOW_ON_GREEN     B_GREEN | F_INTENSE_YELLOW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement