In the R version of {countdown}, there's a quick comparison of values to select either a dark or light color value depending on what a user specifies. The relevant functions being used in R for this decision are from {prismatic}:
With #36, the CSS countdown variables now have a darkening characteristic applied:
|
--_running-border-color: var(--countdown-color-running-border, rgba(0, 0, 0, 0.1)); |
From discussions in #35 we have:
I went with shading (darkening) in the CSS, but we could have tinted (lightend) as well with rgba(255, 255, 255, 0.1) or similar.
The question is how we'd know whether we should lighten or darken. But I'm okay waiting on that as well and working it out in follow up PRs.
If the CSS property color-contrast was implemented in browsers, then this would be a non-issue.
Options in the interim: JavaScript? Re-implement {prismatic} in the different languages? Wait for browser updates?
In the R version of
{countdown}, there's a quick comparison of values to select either adarkorlightcolor value depending on what a user specifies. The relevant functions being used in R for this decision are from{prismatic}:prismatic::clr_lighten()(Show stopper)prismatic::clr_darken()(depends onclr_lighten())prismatic::best_contrast()With #36, the CSS countdown variables now have a darkening characteristic applied:
countdown/lib/countdown.css
Line 4 in 9ee6b7f
From discussions in #35 we have:
If the CSS property
color-contrastwas implemented in browsers, then this would be a non-issue.Options in the interim: JavaScript? Re-implement
{prismatic}in the different languages? Wait for browser updates?