可以在 unocss 的配置文件里进行 theme color 配置,然后就可以随意组合使用了
theme: {
colors: {
'info': '#bfbfbf', // class="text-info"
'content': {
'primary': 'fe003b', // class="text-content-primary"
},
},
}
如果需要直接使用 css 变量的话可以直接写成 "class="text-[--red-color]"" 或者 "class="text-$red-color""