Open hadley opened 4 years ago
I think I decided that prismatic was that thing and I didn't have to build it
Dear Thomas, Hadley,
While exploring farver
and having the same need mentioned by Hadley, I provide just this code as an example:
install.packages('farver', dependencies = TRUE) ## High Performance Colour Space Manipulation
install.packages('prismatic', dependencies = TRUE) ## https://github.com/EmilHvitfeldt/prismatic
library(farver)
library(prismatic)
h <- decode_colour(heat.colors(15)) ## farver
h
hex_h <- encode_colour(h) ## farver
hex_h
heat_colors <- color(hex_h) ## prismatic
heat_colors
plot(heat_colors) ## prismatic
which results in:
Because it's v. nice to have someway to actually see the colours that you're playing with.