R Colors

How to manage colors in R ? For a computer, a color is a mix between 3 main colors : Red, Green and Blue. (RGB color space). Each pixel is made up of 3 points that are to small for the Human eye to see, one of each colors, each color beeing more or less strong. But it is not easy to build your desired color. How can it be done with the R software ?

The easiest way is to call it by its name or its number. See the colors() function to get the list. A more professional way would be to use the rgb or the hsv function, which allows you to make absolutely every colors. A very common way consists to use color palettes. An essential package is the R Color Brewer.

I tried to summarize everything in this  PDF. All the plots below use these techniquess !

Looking for somethig else ? Try a search !

Leave a Reply

Be the First to Comment!

Notify of