import { StyleRule } from '@vanilla-extract/css' ; import { CSSVarFunction } from '@vanilla-extract/private' ; import { Accent , Mode , tokens } from '../tokens' ; export const rgb = ( partial , alpha ? ) => alpha ? `rgba(${ partial }, ${ alpha })` : `rgb(${ partial })` ; export const getAccentText = ( mode , accent ) => [ 'foreground' , 'yellow' ] . includes ( accent ) && mode === 'dark' ? tokens . colors . light . foreground : tokens . colors . dark . foreground ; export const getModeColors = ( mode ) => tokens . colors [ mode ] ; export const getVarName = ( _value , path ) => path . join ( '-' ) . replace ( '.' , '_' ) . replace ( '/' , '__' ) ; export const motionSafe = ( style ) => ( { '@media' : { '(prefers-reduced-motion: no-preference)' : style , } , } ) ;