You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ColorPalette component uses the contrast() function of the colord library to decide whether to render the text label of the color in black or white.
This does not work when the color value is a CSS variable. We'd probably need to do something like getComputedStyle( bgElement ).getPropertyValue( '--my-color' ) to get the actual color value to pass to colord.
Screenshot
The text was updated successfully, but these errors were encountered:
The ColorPalette component uses the
contrast()
function of thecolord
library to decide whether to render the text label of the color in black or white.This does not work when the color value is a CSS variable. We'd probably need to do something like
getComputedStyle( bgElement ).getPropertyValue( '--my-color' )
to get the actual color value to pass tocolord
.Screenshot
The text was updated successfully, but these errors were encountered: