
Last chance! 50% off unlimited learning
Sale ends in
Turns colours into similar colours from the Murdoch Childrens Research Institute palette.
mcri(col = "deafult", al = 1)
character or numeric. Most common colours such as "green" or 'blue' are converted to MCRI. Numbers return the colour matching that number.
The alpha parameter: the opaqueness. Numeric between 0 and 1.
The function return a colour from the MCRI palette if match found, otherwise the input is returned unchanged. call mcri() to see the available colours.
# NOT RUN {
plot(1:9, rep(1,9), pch=16, cex=10, col=mcri(0:8))
text(1:9, rep(1.1,9), c('blue', 'orange', 'green', 'magenta',
'cyan', 'red', 'violet', 'darkblue', 'darkred'),
col=mcri(0:8), cex=1.5, font=2)
# }
Run the code above in your browser using DataLab