col2hexStr(1, prefix = '0x') # "0x000000"
col2hexStr('blue') # "#0000FF"
# Change default palette, see "grDevices::colors()"
grDevices::palette(c('orange3', 'skyblue1'))
col2hexStr(1) # Instead of #000000, #CD8500
Run the code above in your browser using DataLab