We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d177c8 commit 6cc4f84Copy full SHA for 6cc4f84
src/main/java/textFormatter/TextFormatter.java
@@ -383,6 +383,16 @@ else if (TextFormatter.startWithDefaultColorIfNotDefined && this.parent == null)
383
return "" + ESC + '[' + joined + 'm';
384
}
385
386
+ /**
387
+ * Returns whether there is an environment variable that specifies that
388
+ * the terminal does not support color.
389
+ * <a href="https://no-color.org/">NO_COLOR.org</a>
390
+ * @return {@code true} if the terminal supports color
391
+ */
392
+ public static boolean getNoColorEnvironment() {
393
+ return System.getenv("NO_COLOR") != null;
394
+ }
395
+
396
/**
397
* Escape character which represents the start of a terminal sequence
398
*/
0 commit comments