View source: R/do_ColorBlindCheck.R
do_ColorBlindCheck | R Documentation |
This function generate colorblind variations of a provided color palette in order to check if it is colorblind friendly. Variations are generated using colorspace package.
do_ColorBlindCheck(
colors.use,
flip = FALSE,
font.size = 14,
font.type = "sans",
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
grid.color = "white",
border.color = "black",
axis.text.x.angle = 45
)
colors.use |
|
flip |
|
font.size |
|
font.type |
|
grid.color |
|
border.color |
|
axis.text.x.angle |
|
A character vector with the desired color scale.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_ColorBlindCheck", passive = TRUE)
if (isTRUE(value)){
# Generate a color wheel based on a single value.
colors <- c("red", "green", "blue")
p <- SCpubr::do_ColorBlindCheck(colors.use = colors)
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.