flexdashboard icon indicating copy to clipboard operation
flexdashboard copied to clipboard

Specifying font color for `valueBox()`.

Open kputschko opened this issue 1 year ago • 1 comments

I notice that some of my value boxes are now defaulting to a black font color instead of the white that it used to be. Looking inside the function definition, I see there is some work being done to automatically pick a font color based on the background color using

color <- htmltools::parseCssColors(color)
    colorText <- getColorContrast(color)
    colorIcon <- sassValue(paste0("mix(", color, ",", getColorContrast(colorText), 
      ",50%)"))

I'm wondering if we could simply control the font color ourselves to override this default behavior?

kputschko avatar Dec 22 '22 18:12 kputschko