This gadget lets you choose colours easily. You can select multiple colours, and you can either choose any RGB colour, or browse through R colours.
colourPicker(numCols = 3)Vector of selected colours
This gadget returns a vector of colours that can be assigned to a variable. If instead you want to get a text representation of the colours that can embedded into code, use the addin from the RStudio Addins menu.
if (interactive()) {
cols <- colourPicker(5)
}