R Under development (unstable) (2024-10-04 r87206 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > suppressMessages(library(gplots)) > > col <- "#123456" > col2 <- adjust_hsv(col, h=0.1) # h > col3 <- adjust_hsv(col, s=0.1) # s > col4 <- adjust_hsv(col, v=0.7) # v > col5 <- adjust_hsv("blue") # name > col6 <- adjust_hsv(4) # integer > col7 <- adjust_hsv(palette(), alpha=0.1) # multiple colors, alpha > > cols <- c(col2, col3, col4, col5, col6, col7) > > stopifnot(all(is.character(cols))) # character > stopifnot(all(substring(cols, 1, 1) == "#")) # start with # > stopifnot(all(nchar(cols) %in% c(7, 9))) # either 7 or 9 chars long > > barplot(rep(1, length(cols)), col=cols, space=0, border=NA) # can be used > > proc.time() user system elapsed 0.29 0.12 0.40