Description Usage Arguments Value Examples
Create rectangles in HTML to display colors
1 | colors_rect(colors, width = "100%", height = "45px")
|
colors |
A vector of colors to visualize |
width |
The width of the HTML tag, e.g. '400px', or '100%'. |
height |
The height of the HTML tag, e.g. '400px', or '100%'. |
An HTML tag
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
if (interactive()) {
library(shiny)
library(colorscale)
ui <- fluidPage(
tags$h2("Visualizing colors in Shiny"),
colors_rect(colors = c(
get_dark_cols("#1D9A6C"),
"#1D9A6C",
get_light_cols("#1D9A6C")
))
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.