themes.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. const color = require('cli-color');
  2. ///////////////////////////////////////////////////////////
  3. // Supported color attributes:
  4. //
  5. // time - timestamp color;
  6. // value - color for any value;
  7. // cn - connect/disconnect color;
  8. // tx - transaction start/finish color;
  9. // paramTitle - color for parameter titles: params/query/tx;
  10. // errorTitle - color for error title: 'error';
  11. // query - color for regular queries;
  12. // special - color for special queries: begin/commit/rollback;
  13. // error - error message color;
  14. ///////////////////////////////////////////////////////////
  15. const themes = {
  16. /////////////////////////////////////////
  17. // Themes for black or dark backgrounds
  18. /////////////////////////////////////////
  19. // dimmed palette (the default theme);
  20. dimmed: {
  21. time: color.bgWhite.black,
  22. value: color.white,
  23. cn: color.yellow,
  24. tx: color.cyan,
  25. paramTitle: color.magenta,
  26. errorTitle: color.redBright,
  27. query: color.whiteBright,
  28. special: color.green,
  29. error: color.red
  30. },
  31. // bright palette;
  32. bright: {
  33. time: color.bgBlue.whiteBright,
  34. value: color.white,
  35. cn: color.yellowBright,
  36. tx: color.cyanBright,
  37. paramTitle: color.magentaBright,
  38. errorTitle: color.redBright,
  39. query: color.whiteBright,
  40. special: color.greenBright,
  41. error: color.redBright
  42. },
  43. // black + white + grey;
  44. monochrome: {
  45. time: color.bgWhite.black,
  46. value: color.whiteBright,
  47. cn: color.white,
  48. tx: color.white,
  49. paramTitle: color.white,
  50. errorTitle: color.white,
  51. query: color.whiteBright,
  52. special: color.whiteBright,
  53. error: color.whiteBright
  54. },
  55. // colors without distraction;
  56. minimalist: {
  57. time: color.bgWhite.black,
  58. value: color.white,
  59. cn: color.yellow,
  60. tx: color.yellow,
  61. paramTitle: color.cyan,
  62. errorTitle: color.redBright,
  63. query: color.whiteBright,
  64. special: color.whiteBright,
  65. error: color.red
  66. },
  67. // classy green;
  68. matrix: {
  69. time: color.bgGreen.black,
  70. value: color.white,
  71. cn: color.green,
  72. tx: color.green,
  73. paramTitle: color.green,
  74. errorTitle: color.green,
  75. query: color.whiteBright,
  76. special: color.whiteBright,
  77. error: color.greenBright
  78. },
  79. ///////////////////////////////////////////
  80. // Themes for white or bright backgrounds
  81. ///////////////////////////////////////////
  82. // black + white + grey;
  83. invertedMonochrome: {
  84. time: color.bgWhite.black,
  85. value: color.blackBright,
  86. cn: color.black,
  87. tx: color.black,
  88. paramTitle: color.black,
  89. errorTitle: color.black,
  90. query: color.blackBright,
  91. special: color.blackBright,
  92. error: color.blackBright
  93. },
  94. // colorful contrast, with enforced white background
  95. invertedContrast: {
  96. time: color.bgBlue.white,
  97. value: color.bgWhiteBright.blueBright,
  98. cn: color.bgWhiteBright.black,
  99. tx: color.bgWhiteBright.black,
  100. paramTitle: color.bgWhiteBright.magenta,
  101. errorTitle: color.bgWhiteBright.red,
  102. query: color.bgWhiteBright.green,
  103. special: color.bgWhiteBright.cyan,
  104. error: color.bgWhiteBright.redBright
  105. }
  106. };
  107. module.exports = themes;