Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. // Here is reference of colors and other characters:
  2.  
  3. const Reset = "\x1b[0m";
  4. const Bright = "\x1b[1m";
  5. const Dim = "\x1b[2m";
  6. const Underscore = "\x1b[4m";
  7. const Blink = "\x1b[5m";
  8. const Reverse = "\x1b[7m";
  9. const Hidden = "\x1b[8m";
  10.  
  11. const FgBlack = "\x1b[30m";
  12. const FgRed = "\x1b[31m";
  13. const FgGreen = "\x1b[32m";
  14. const FgYellow = "\x1b[33m";
  15. const FgBlue = "\x1b[34m";
  16. const FgMagenta = "\x1b[35m";
  17. const FgCyan = "\x1b[36m";
  18. const FgWhite = "\x1b[37m";
  19.  
  20. const BgBlack = "\x1b[40m";
  21. const BgRed = "\x1b[41m";
  22. const BgGreen = "\x1b[42m";
  23. const BgYellow = "\x1b[43m";
  24. const BgBlue = "\x1b[44m";
  25. const BgMagenta = "\x1b[45m";
  26. const BgCyan = "\x1b[46m";
  27. const BgWhite = "\x1b[47m";
  28.  
  29. // You can print colorful text to command when run nodejs application.
  30.  
  31. console.log(FgCyan + "%s" + Reset, info); //cyan
  32. console.log(FgYellow + "%s" + Reset, path); //yellow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement