code: static Color getColorProperty(IChemObject object, String key) {
          Object value = object.getProperty(key);
          if (value instanceof Color) return (Color) value;
          if (value != null) throw new IllegalArgumentException(key + " property should be a java.awt.Color");
          return null;
      }
docs: Safely access a chem object color property for a chem object.
  
  @param object chem object
  @return the highlight color
  @throws java.lang.IllegalArgumentException the highlight property was set but was not a
  {@link Color} instance