Choosing colors in R

2 Min Read

R has very powerful capabilities for choosing colors to use in statistical graphics. With the rgb function, you can choose any color from the spectrum by choosing its red, green, and blue components. Alternatively, you can choose from 657 “designer” colors you by name — you can see them all by typing colors() at the command prompt.

To help you choose the right color from that list, here’s a handy page displaying samples of all 657 colors, and providing many useful hints and tips for working with colors in R. There’s also a PDF version suitable for printing (on a high-fidelity color printer) and pasting to your wall.

The page is quite old, but all the info is current up to R 2.7.2 and REvolution R 2.0 at least.

Earl F Glynn: Chart of R Colors


R has very powerful capabilities for choosing colors to use in statistical graphics. With the rgb function, you can choose any color from the spectrum by choosing its red, green, and blue components. Alternatively, you can choose from 657 “designer” colors you by name — you can see them all by typing colors() at the command prompt.

To help you choose the right color from that list, here’s a handy page displaying samples of all 657 colors, and providing many useful hints and tips for working with colors in R. There’s also a PDF version suitable for printing (on a high-fidelity color printer) and pasting to your wall.

The page is quite old, but all the info is current up to R 2.7.2 and REvolution R 2.0 at least.

Earl F Glynn: Chart of R Colors

TAGGED:
Share This Article
Exit mobile version