-
Is it possible to set an alpha on a token color, similar to how tailwind allows Example// assuming a theme config like
export default defineConfig({
// ...
tokens: {
colors: {
dark: { value: '#000000' }
}
}
})
// and usage like
const button = css({
backgroundColor: 'dark' // Is it possible to set the alpha channel to 40%?
}) I sifted through the docs and couldn't find anything on color (hex) opacity, though totally possible that I just missed something in the docs. Thanks in avance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
@sseagull it's not possible yet. We plan to implement this using |
Beta Was this translation helpful? Give feedback.
-
Here's a naive userland implementation: https://play.panda-css.com/huZH-3NCkd <button
className={css({
color: 'red.400',
bgct: 'red.400/90'
})}
>
Hello world
</button> |
Beta Was this translation helpful? Give feedback.
-
I didn't know but this seems now possible. There's still part of the docs (the FAQ) linking to this discussion though. |
Beta Was this translation helpful? Give feedback.
@sseagull it's not possible yet. We plan to implement this using
color-mix