bricks_delete_color

Phase 2BeginnerDestructiveComplexity: 2/10
Remove a color from the palette

Overview

Deletes a color from the Bricks color palette. This permanently removes the color entry, its CSS variable, and any associated utility classes. Elements referencing the deleted color’s CSS variable will lose their color styling.

Key Features

Permanent deletion
Removes the color, its CSS variable, and utility classes from the palette

When to Use

Removing unused colors from the palette
Cleaning up duplicate or incorrect color entries
Part of a palette restructuring workflow
Prerequisites
Get the color_id from bricks_get_color_palette
Verify the color is not actively used in elements or global classes

When NOT to Use

If the color is actively used in elements or classes — check usage first
To modify a color — use bricks_update_color instead

Parameters

1 Total Parameters1 Required
color_idstringREQUIRED
ID of the color to delete

Code Examples

Delete a color

Remove a color by its ID

JSON
{
    "color_id": "abc123"
}
Response
{"success": true}

Common Mistakes

Deleting a color that is referenced by elements or global classes
Check color usage via bricks_get_color_palette and search for var(--bricks-color-{name}) references before deleting

Tips & Warnings

Tips & Warnings
  • This action is permanent — there is no undo
  • Elements using var(--bricks-color-{name}) will lose their color after deletion
  • Consider using bricks_update_color to change a color rather than deleting and recreating

Return Values

FieldTypeDescription
successbooleanWhether the color was deleted successfully

Related Tools

Technical Details

Tool ID
bricks_delete_color
API Endpoint
/bricks-mcp/v1/design-system/colors/{color_id}
HTTP Method
DELETE
Namespace
design-system
Source File
design-system/colors.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101