col2hex converts colours specified in any format
  into their hexadecimal character codes.  rgb2hex converts RGB colour values into their hexadecimal
  character codes.
  paletteindex checks whether the colour or colours specified
  by x are available in the default palette returned by
  palette(). If so, it returns the index or indices of
  the colours in the palette. If not, it returns NA.
  samecolour decides whether two colours x and y
  are equivalent.