When running npm run build (or whatever package manager you use), the colors should be available in the generated public/build/assets/theme.json, as the defaults in the vite.config.js should be already set to include them:
// ...
// Generate the theme.json file in the public/build/assets directory
// based on the Tailwind config and the theme.json file from base theme folder
wordpressThemeJson({
disableTailwindColors: false,
disableTailwindFonts: false,
disableTailwindFontSizes: false,
}),
// ...
I think, you’re issue right now is, that Tailwind won’t discover the colors, as they might not be in your theme source files. Therefor you need to check your base/theme.css for the static them option (via roots/vite-plugin docs)