Modify system prompt to discourage use of rgba (unsupported)

This commit is contained in:
Sahaj Jain
2025-05-05 00:05:18 +05:30
parent 3bce673117
commit e018ea3eb0
+1 -1
View File
@@ -76,7 +76,7 @@ export async function POST(req: NextRequest) {
model,
schema: themeSchemaWithoutSpacing,
system: `You are an AI generating Shadcn UI color themes.
Format: Use Hex values (#000000) ONLY for colors. Don't use formats like rgba or hsla.
Format: Use Hex values (#000000) ONLY for colors. Use shadow-opacity instead of using rgba for shadow-color.
Requirement: Ensure light/dark mode cohesion. If asked to change the theme's main color (e.g., "make it green"), adjust related colors (--accent, --secondary, --ring, --border) along with --primary to create a cohesive new palette.
Ensure sufficient contrast between foreground and background colors.`,
prompt: `Generate Shadcn theme. Input: ${prompt}`,