Thanks to visit codestin.com
Credit goes to github.com

Skip to content

R code to create colour ramps with some colour-blindness support

tim-band/colourramp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

colourramp

R code to create colour ramps with some colour-blindness support

make a colour ramp:

ramp <- colour_ramp(list("black", "red", "light blue"))

and get 6 colours out of it:

ramp(6)

You can make a colour ramp which works better for colourblind individuals using the collapse_red_green or collapse_blue_yellow flags:

ramp <- colour_ramp(list("black", "red", "light blue"), collapse_red_green = TRUE)

This will give a ramp which puts more colours along blue-yellow parts of the ramp than red-green. If you have a red node next to a green node, this will likely still give a ramp that is not too friendly to red-green colourblind individuals, though, so use with care.

About

R code to create colour ramps with some colour-blindness support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages