make_color_contrast | R Documentation |
Make color contrast
make_color_contrast(
x,
y = NULL,
bg = "white",
L_threshold = 65,
C_floor = 90,
L_hi = 95,
L_lo = 40,
blend_preset = "ryb",
do_plot = FALSE,
cex = 2,
...
)
blend_preset |
|
This function provides a simple method to ensure a color has adequate visual contrast with a background color, while retaining some color saturation. For example, red on red background will return something close to pink, so the pink retains the red color saturation but is visually distinct from the background color red.
Similarly, pink on pink will return something close to red.
Other venndir utility:
curate_venn_labels()
,
expand_range()
,
make_venn_combn_df()
,
make_venn_test()
,
match_list()
,
nudge_venndir_label()
,
print_color_df()
,
shrink_df()
,
three_point_angle()
,
venndir_legender()
,
venndir_to_df()
x <- c("firebrick", "dodgerblue", "gold", "pink", "white");
y <- rep("red3", 4);
make_color_contrast(x, y, do_plot=TRUE);
y <- rep("pink1", 4);
make_color_contrast(x, y, do_plot=TRUE);
y <- rep("gold", 4);
make_color_contrast(x, y, do_plot=TRUE);
y <- c("red4", "aquamarine4", "blue3", "yellow", "pink2")
make_color_contrast(x, y, do_plot=TRUE, C_floor=140);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.