flexdashboard icon indicating copy to clipboard operation
flexdashboard copied to clipboard

Specifying font color for `valueBox()`.

Open kputschko opened this issue 2 years 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

Yes, that seems like a good idea. Would you like to make a pull request?

cpsievert avatar Jan 05 '23 17:01 cpsievert