Java Color Create color(String msg)

Here you can find the source of color(String msg)

Description

Coloring message

License

Open Source License

Parameter

Parameter Description
msg non-colored message

Declaration

public static String color(String msg) 

Method Source Code

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

public class Main {
    /**/*w w  w.j av  a  2s.c om*/
     * Coloring message
     * @param msg non-colored message
     */
    public static String color(String msg) {
        return msg.replaceAll("&([0-9a-fA-Fk-oK-OrR])", "\u00A7$1");
    }
}

Related

  1. Color(int index)
  2. color(int red, int green, int blue, int alpha)
  3. color(int val)
  4. color(String color)
  5. color(String color, Object value)
  6. color(String msg)
  7. color(String s)
  8. color(String s)
  9. colorFromRGB(int r, int g, int b)