code: public static String shorthandHexSingle(String color) {
  		validateHexSingle(color);
  		if (color.length() > 1
  				&& Character.toUpperCase(color.charAt(0)) == Character
  						.toUpperCase(color.charAt(1))) {
  			color = color.substring(0, 1);
  		}
  		return color;
  	}
docs: Shorthand the hex single color if possible
  
  @param color
  hex single color
  @return shorthand hex color or original value