Skip to contents

Convert a list of colors to SCSS/Sass variables or classes

Usage

colors2css(colors, file = "", sass_vars = TRUE)

Arguments

file

A connection, or a character string naming the file to print to. If "" (the default), cat prints to the standard output connection, the console unless redirected by sink. If it is "|cmd", the output is piped to the command given by cmd, by opening a pipe connection.

color_theme

2-layer list with dark/light themes

Value

msg Sass/SCSS formatted variables or classes

Examples

colors2css(c(a = "white", b = "green"))
#> [1] "$a: white;" "$b: green;"