Java Color Create color(String color)

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

Description

color

License

Open Source License

Declaration

public static String color(String color) 

Method Source Code

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

public class Main {
    public static String color(String color) {
        if (color == null) {
            return "#FF0000";
        } else if (color.startsWith("#")) {
            return color;
        } else {/*from www .  j  a va  2s. c o  m*/
            return "#" + color;
        }
    }
}

Related

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