rstudio / rstudio/flexdashboard
Specifying font color for `valueBox()`.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 848
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the valueBox() implementation and the color-selection code shown in the issue. Trace how the background and font colors are currently chosen, then identify the existing valueBox styling or option path relevant to an explicit font color. Done means a specified font color can override the automatic choice without breaking the default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, sass
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100