public static boolean looksLikeAColor(String val){
  return COLOR_MAP.get(val) != null || (val.startsWith("#") && (val.length() == 7 || val.length() == 4)) || val.startsWith("rgb");
}

public static boolean looksLikeAColor ( String val ) { return COLOR_MAP . get ( val ) != null || ( val . startsWith ( "#" ) && ( val . length ( ) == 7 || val . length ( ) == 4 ) ) || val . startsWith ( "rgb" ) ; }
description of the method
