Description Usage Arguments Details Value Author(s) See Also Examples

Converting a RGB-color to a named R-Color means looking for a color in the R-palette, which is nearest to the given RGB-color.
This function uses the minimum of squared distance (`"euclidean"`

) or the minimum absolute distance (`"manhattan"`

) as proximity measure.

`RgbToLong()`

converts a RGB-color to a long integer in numeric format. `LongToRGB()`

does it the other way round.

1 2 3 4 |

`col` |
the color in rgb code, say a matrix with the red, green and blue code in the rows. |

`method` |
character string specifying the color space to be used. Can be |

`metric` |
character string specifying the metric to be used for calculating distances between the colors.
Available options are |

It may not be clear from the start which method, rgb or hsv, yield the more natural results. Trying and comparing is a recommended strategy. Moreover the shortest numerical distance will not always be the best choice, when comparing the colours visually.

the name of the nearest found R color.

Andri Signorell <andri@signorell.net>

`ColToRgb`

and the other conversion functions

1 2 3 |

```
[1] "brown"
[1] 2763426
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.