Swatch
Check WCAG color contrast, fix failing colors, build 50-950 palettes. No account.
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"swatch": {
"url": "https://swatch.clawhard.com/mcp"
}
}
}Remote-Endpunkte
https://swatch.clawhard.com/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (4)
🟢swatch_check_contrast(foreground, background)
Use when the user asks whether a color combination is readable or accessible, passes WCAG AA or AAA, or has enough contrast (text on a background, button, badge, link color), or what a color is in another format. Returns the exact contrast ratio, pass or fail for normal text, large text and UI components at AA and AAA, the APCA lightness contrast and a plain note. Colors can be hex, rgb(), hsl() or CSS names. Example: {"foreground": "#777777", "background": "#ffffff"}. Also returns each color in hex, rgb, hsl and oklch with its nearest CSS name.
Eingabe-Schema
{
"type": "object",
"properties": {
"foreground": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Text (or icon) color, e.g. \"#767676\" or \"rgb(20 20 20)\" or \"tomato\"."
},
"background": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Background color, e.g. \"#ffffff\"."
}
},
"required": [
"foreground",
"background"
]
}🟢swatch_fix_contrast(foreground, background, target)
Use when a color pair fails contrast and the user wants the smallest change that makes it pass, such as "make this gray text accessible without changing the look". Returns the closest text color on that background that reaches the target (AA, AAA, AA-large or ui), and separately the closest background, keeping the hue. Example: {"foreground": "#777777", "background": "#ffffff", "target": "AA"}. Returns already_passes if nothing needs to change.
Eingabe-Schema
{
"type": "object",
"properties": {
"foreground": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Current text color."
},
"background": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Current background color."
},
"target": {
"type": "string",
"enum": [
"AA",
"AAA",
"AA-large",
"ui"
],
"description": "Contrast target. Default AA."
}
},
"required": [
"foreground",
"background"
]
}🟢swatch_make_scale(color, name)
Use when the user asks for a palette, shades, tints, a design-token scale or a Tailwind-style 50 to 950 ramp from a brand color. Returns 11 steps that keep the hue, with the hex, contrast on white and on black, and the best text color for each step. Example: {"color": "#ff5a1f", "name": "brand"}.
Eingabe-Schema
{
"type": "object",
"properties": {
"color": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "Base color, e.g. \"#ff5a1f\"."
},
"name": {
"type": "string",
"maxLength": 24,
"description": "Token name used in the CSS and Tailwind output. Default \"brand\"."
}
},
"required": [
"color"
]
}🟢swatch_check_pairs(pairs)
Use when the user has a whole design system, theme or stylesheet and wants every text and background pair checked for accessibility in one go. Takes up to 50 pairs and returns the ratio and AA and AAA results for each, with a count of failures. Example: {"pairs": [{"foreground": "#777", "background": "#fff", "label": "muted text"}, {"foreground": "#fff", "background": "#ff5a1f", "label": "button"}]}.
Eingabe-Schema
{
"type": "object",
"properties": {
"pairs": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"description": "Pairs to check.",
"items": {
"type": "object",
"properties": {
"foreground": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"background": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"label": {
"type": "string",
"maxLength": 60,
"description": "Optional name, like \"muted text on card\"."
}
},
"required": [
"foreground",
"background"
]
}
}
},
"required": [
"pairs"
]
}Community
Nachweis