Description Usage Arguments Value Examples
Finds the highest contrast color available for those specified by the user. Uses gradient-descent optimization on the "contrast" function.
1 2 | maximize_contrast(..., maxrep = 10, maxit = 100, h = 1e-08,
output = "hex")
|
... |
All the colors of interest. Hexcode, c(r,g,b), color name as character and "color" class object are all supported. |
maxrep |
Number of times the process of local optimization will be repeated. Defaults to 10 |
maxit |
Number of iterations for each gradient descent optimization (finding of local minimum). Defaults to 100 |
h |
Step used to calculate the gradient of the contrast function. Defaults to 1e-8 |
Either a hexcode or class "color" object with highest contrast with those inputted.
1 2 3 | maximize_contrast("green")
maximize_contrast("yellow", "red")
maximize_contrast(list("yellow", "red", c(0,255,0)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.