Skip to content

Instantly share code, notes, and snippets.

@loiane
Created February 9, 2016 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loiane/8eab864d4c0d39d829e3 to your computer and use it in GitHub Desktop.
Save loiane/8eab864d4c0d39d829e3 to your computer and use it in GitHub Desktop.
public class TesteConsoleColorido {
public static final String ANSI_RESET = "\u001B[0m";
public static final String ANSI_BLACK = "\u001B[30m";
public static final String ANSI_RED = "\u001B[31m";
public static final String ANSI_GREEN = "\u001B[32m";
public static final String ANSI_YELLOW = "\u001B[33m";
public static final String ANSI_BLUE = "\u001B[34m";
public static final String ANSI_PURPLE = "\u001B[35m";
public static final String ANSI_CYAN = "\u001B[36m";
public static final String ANSI_WHITE = "\u001B[37m";
public static void main(String[] args) {
System.out.println(ANSI_RED + "Texto em vermelho" + ANSI_RESET);
System.out.println(ANSI_BLACK + "Texto em preto" + ANSI_RESET);
System.out.println(ANSI_BLUE + "Texto em azul" + ANSI_RESET);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment