For continuity in creating presentations and figures it is often necessary to have color schemes that are consistent for certain features, especially when different plots and figures of these features are made using different software. R includes a nice palette of pre-defined colors for easily implementing rich colors in graphics. In order to extract the RGB values (ie: red, green, blue) to use these colors in other programs, R has a nice built-in command that extracts the RGB values: col2rgb. Simply put your color name in quotes and parenthesis and R will return the RGB values. Here is an example.
No comments:
Post a Comment