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
Is there a smart way to handle contrast color for primary?
I thought to just make primary an object:
primary: {main: '#c33991',contrast: '#fff'}
Now I have to reference it in sx with primary.main and primary.contrast. This seems messy. Maybe there is a way to make primary reference #c33991 and primary.contrast reference #fff?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Say I have the following colors:
Is there a smart way to handle contrast color for
primary
?I thought to just make
primary
an object:Now I have to reference it in
sx
withprimary.main
andprimary.contrast
. This seems messy. Maybe there is a way to makeprimary
reference#c33991
andprimary.contrast
reference#fff
?Beta Was this translation helpful? Give feedback.
All reactions