public NamedColor(String[] namesArray,int r,int g,int b){
  super(r,g,b);
  names=new HashSet<>();
  names.addAll(Arrays.asList(namesArray));
  namesLowercase=new HashSet<>();
  for (  String thisName : namesArray) {
    namesLowercase.add(thisName.toLowerCase());
  }
  if (namesArray.length == 0) {
    name="";
  }
 else {
    name=namesArray[0];
  }
}

public NamedColor ( String [ ] namesArray , int r , int g , int b ) { super ( r , g , b ) ; names = new HashSet < > ( ) ; names . addAll ( Arrays . asList ( namesArray ) ) ; namesLowercase = new HashSet < > ( ) ; for ( String thisName : namesArray ) { namesLowercase . add ( thisName . toLowerCase ( ) ) ; } if ( namesArray . length == 0 ) { name = "" ; } else { name = namesArray [ 0 ] ; } }
constructs a new color with the given names and rgb values . the first name in the array is used as the primary name .
