Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Reset      = "\x1b[0m"
  2. const Bright     = "\x1b[1m"
  3. const Dim        = "\x1b[2m"
  4. const Underscore = "\x1b[4m"
  5. const Blink      = "\x1b[5m"
  6. const Reverse    = "\x1b[7m"
  7. const Hidden     = "\x1b[8m"
  8. const FgBlack    = "\x1b[30m"
  9. const FgRed      = "\x1b[31m"
  10. const FgGreen    = "\x1b[32m"
  11. const FgYellow   = "\x1b[33m"
  12. const FgBlue     = "\x1b[34m"
  13. const FgMagenta  = "\x1b[35m"
  14. const FgCyan     = "\x1b[36m"
  15. const FgWhite    = "\x1b[37m"
  16. const BgBlack    = "\x1b[40m"
  17. const BgRed      = "\x1b[41m"
  18. const BgGreen    = "\x1b[42m"
  19. const BgYellow   = "\x1b[43m"
  20. const BgBlue     = "\x1b[44m"
  21. const BgMagenta  = "\x1b[45m"
  22. const BgCyan     = "\x1b[46m"
  23. const BgWhite    = "\x1b[47m"
  24.  
  25. const move    = (x, y) => `\x1b[${y};${x}f`
  26. const up      = (x) => `\x1b[${x}A`
  27. const down    = (x) => `\x1b[${x}B`
  28. const forward = (x) => `\x1b[${x}C`
  29. const back    = (x) => `\x1b[${x}D`
  30. const save    = ()  => '\x1b[s'
  31. const restore = ()  => '\x1b[u'
  32. const clear   = ()  => `\x1b[2J`
  33. const erase   = ()  => `\x1b[K`
  34. const pos     = ()  => `\x1b[6n`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement