A Toolbox for Manipulating and Assessing Colors and Palettes

Carries out mapping between assorted color spaces including RGB, HSV, HLS, CIEXYZ, CIELUV, HCL (polar CIELUV), CIELAB, and polar CIELAB. Qualitative, sequential, and diverging color palettes based on HCL colors are provided along with corresponding ggplot2 color scales. Color palette choice is aided by an interactive app (with either a Tcl/Tk or a shiny graphical user interface) and shiny apps with an HCL color picker and a color vision deficiency emulator. Plotting functions for displaying and assessing palettes include color swatches, visualizations of the HCL space, and trajectories in HCL and/or RGB spectrum. Color manipulation functions include: desaturation, lightening/darkening, mixing, and simulation of color vision deficiencies (deutanomaly, protanomaly, tritanomaly). Details can be found on the project web page at < https://colorspace.R-Forge.R-project.org/> and in the accompanying scientific paper: Zeileis et al. (2020, Journal of Statistical Software, ).


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("colorspace")

2.1-4 by Achim Zeileis, 11 days ago


https://zeileis.codeberg.page/colorspace/, https://hclwizard.org/


Report a bug at https://codeberg.org/zeileis/colorspace/issues


Browse source code at https://github.com/cran/colorspace


Authors: Ross Ihaka [aut] , Paul Murrell [aut] , Kurt Hornik [aut] , Jason C. Fisher [aut] , Reto Stauffer [aut] , Claus O. Wilke [aut] , Claire D. McWhite [aut] (ORCID: , Achim Zeileis [aut, cre] (ORCID:


Documentation:   PDF Manual  


BSD_3_clause + file LICENSE license


Imports graphics, grDevices, stats

Depends on methods

Suggests datasets, utils, KernSmooth, MASS, kernlab, mvtnorm, vcd, tcltk, shiny, shinyjs, ggplot2, dplyr, scales, grid, png, jpeg, knitr, rmarkdown, RColorBrewer, rcartocolor, scico, viridis, wesanderson


Imported by APCtools, BayesX, BioRssay, BiplotGUI, CNSigs, CRABS, ChemoSpec2D, CliquePercolation, ComplexUpset, CspStandSegmentation, DImodelsVis, DepthProc, EMC2, EcotoneFinder, FishDiveR, GGenemy, GHRexplore, GTAPViz, GeRnika, GeneNMF, Gifi, HH, HYPEtools, Hmisc, INFOSET, JOPS, MCMCvis, MixMashNet, NMF, NSMM, NetOrigin, OpenRepGrid, PRECAST, PathwaySpace, Polychrome, RavenR, Rbearcat, RcmdrMisc, SGP, SPARTAAS, SVAlignR, TIMP, ThinkingGrid, Thresher, TraMineR, TraMineRextras, TwoTimeScales, Wats, WeightedTreemaps, ambre, anacor, aqp, autoimage, bartMan, bayesianVARs, bea.R, brandr, bullseye, childsds, circlize, clustGLMM, cmsafvis, colorBlindness, colorRamp2, colorblindcheck, colorist, colorize, colorsGen, cols4all, condvis2, copula, corr2D, cranly, denim, eRm, effects, eks, eseis, espadon, expectreg, forecast, frontiles, ftsa, gdam, geiger, genridge, getspres, ggcharts, gggenomes, ggincerta, ggseqplot, ggtintshade, ggtwotone, ggwordcloud, gpairs, gptstudio, gwasforest, hbamr, heatmaply, hues, iNZightTS, ideanet, jamba, lavaangui, ldaPrototype, lessR, ltc, mapStats, mccca, mergenstudio, metafolio, munsell, netmeta, nixmass, optimization, pals, phyloregion, qgraph, rCNV, rainbow, randomcoloR, rms, roloc, rolocISCCNBS, rstudiothemes, scGate, scRNAstat, semPlot, seriation, simPop, simplecolors, simsalapar, slopes, stray, swatches, tmap.mapgl, tna, trackeRapp, treemap, ucie, vcd, vcdExtra, visTree, vivid, wheatmap, whomds, wjake, xaringanthemer, xpose.xtras.

Depended on by NonParRolCor, R2BayesX, RolWinMulCor, VIM, W2CWM2C, bamlss, cabootcrs, grpCox, mixAK, prefmod, smacof.

Suggested by APackOfTheClones, AiES, BiodiversityR, DEoptim, DataVisualizations, GHRmodel, Guerry, IBMPopSim, IncDTW, IsoriX, LBSPR, LocalControl, MALDIassist, NDPalette, PairViz, RGraphics, Rcmdr, SCpubr, SWMPr, Slick, TH.data, UpAndDownPlots, WRS2, atpolR, berryFunctions, blockr.dag, blockr.dock, brms, casebase, cba, cmsaf, cograph, collapsibleTree, colorrepel, cotram, csa, cubble, dataquieR, dendextend, depictr, ecorisk, expertsurv, fanplot, finalsize, flexsurv, fonctionr, ggplotify, ggtaichi, grImport, hermiter, hetGP, hmetad, httk, httkexamples, jumble, kumquat, lattice, lionfish, lisat, logolink, mdendro, mlt.docreg, movMF, mulgar, mvgam, mvord, nflplotR, nodiv, palettes, party, r3js, rasterVis, rattle, reaborn, regsem, reservr, rpanel, rtemis, surveillance, tbm, tcpl, tmap, tourr, tram, tramnet, tramvs, trtf, unhcrthemes, vangogh, vibass, viridis, wacolors.

Enhanced by shades.


See at CRAN