question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to turn off colors

See original GitHub issue

I’d love an option to turn off colors. I’d like to use this for the hubot of a Slack channel, but the colorization seems extremely resistant to removal. I’ve tried all of these:

  • /(\x03\d{0,2}(,\d{0,2})?|\u200B)/g
  • /[\x0F\x02\x16\x1F]/g
  • /\x1b\[.\{1,5\}m/g

But I still see [90m, [39m, [31m, etc throughout the table. 😕

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

7reactions
nodesocketcommented, Aug 11, 2015

This works:

var tableOptions = {};
if(nocolors) {
    tableOptions = {
        style: {
            head: [],
            border: []
        }
    }
}
var t = new table(tableOptions);
0reactions
joshbetzcommented, May 1, 2018

#95 should fix it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn off color in Linux terminal/bash session - nixCraft
You can disable all color in your shell. By default, colors are turned on by many commands. The xterm program is a terminal...
Read more >
How to turn off color with `ls`? - Unix & Linux Stack Exchange
If you need to turn it off to pipe it to something else, use the switch in that pipe. But, colors shouldn't be...
Read more >
Enable or Disable Color Filters Hotkey in Windows 10 - Winaero
Open the Settings app. Go to Ease of Access -> Color filters. On the right, enable the option Allow the shortcut key to...
Read more >
Turn On or Off Color Filters to the Screen in Windows 10
1 Press the Win + Ctrl + C keys to toggle color filters on or off using the currently chosen filter you see...
Read more >
How to turn off all colors - Vim Tips Wiki - Fandom
So this option was not good enough for me. I also tried "syntax off" + "set nohlsearch". This option is nice most of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found