Java Terminal Color Output colors(String string)

Here you can find the source of colors(String string)

Description

COLORIZE STRING

License

Open Source License

Declaration

public static String colors(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /************************************************************************************************
     * COLORIZE STRING/* w ww  . ja v a 2 s. c  o m*/
     ***********************************************************************************************/
    public static String colors(String string) {
        if (string == null)
            return null;
        string = string.replaceAll("&([0-9a-fA-Fk-pK-PrR])", "\u00A7$1");
        string = string.replaceAll("\u00A7P", "\u00A7p");
        return string;
    }
}

Related

  1. colorizeBackground(String str, String color, boolean autoff)
  2. colorizeSequence(String cigar, String seq)
  3. colorizeText(String str, String color)
  4. colorizeText(String str, String color)
  5. colorizeText(String str, String fgc, String bgc)
  6. colorString(String input)
  7. colorString(String string)
  8. colorText(final int color)
  9. colorText(int v, int vlo, int vhi, int rlo, int glo, int blo, int rhi, int ghi, int bhi)