Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide something like scales::show_col() ? #24

Open
hadley opened this issue Oct 30, 2020 · 2 comments
Open

Provide something like scales::show_col() ? #24

hadley opened this issue Oct 30, 2020 · 2 comments

Comments

@hadley
Copy link

hadley commented Oct 30, 2020

Because it's v. nice to have someway to actually see the colours that you're playing with.

@thomasp85
Copy link
Owner

I think I decided that prismatic was that thing and I didn't have to build it

@ericmelse
Copy link

ericmelse commented Jul 11, 2024

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:
R_Figure_heat_colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants