Tailwind Shades
Tailwind CSS palettes (50-950) from any color, the closest Tailwind color, and Tailwind's defaults
사용해야 할까요
품질 및 안전성
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"tailwindshades": {
"command": "npx",
"args": [
"tailwindshades-mcp"
]
}
}
}실행 가능한 패키지
1.6.0stdio원격 엔드포인트
https://tailwindshades.bourhaouta.com/mcpstreamable-http할 수 있는 일
도구 목록
도구 (5)
🟢generate_palette(color, name, tailwindVersion, format, output, ...)
Generates a full Tailwind CSS palette (50-950) from one color, ready to paste. Call it whenever you add a color to a Tailwind theme (e.g. "add a brand color #db4d53"), instead of writing a single variable or inventing shades. The input color stays exactly at its best-fit shade, and the other shades follow the closest Tailwind color, so they look like Tailwind's own.
입력 스키마
{
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Any CSS color: hex (#db4d53), rgb(), hsl(), oklch() or a named color"
},
"name": {
"description": "Color name used in the code, e.g. \"brand\". Defaults to the closest Tailwind color, which replaces Tailwind's own palette of that name (e.g. red), so pass a name unless that is what the user wants",
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"tailwindVersion": {
"description": "The project's Tailwind CSS major version. Defaults to 4",
"type": "number",
"enum": [
4,
3,
2,
1
]
},
"format": {
"description": "Color format. Defaults to oklch for v4 and hex for older versions",
"type": "string",
"enum": [
"oklch",
"hex",
"rgb"
]
},
"output": {
"description": "theme: a v4 @theme block for the main CSS file. config: an object for theme.extend.colors in tailwind.config.js. css: plain CSS variables. live (v4 only): for a color picked at runtime (user, tenant or CMS setting): CSS where every shade follows one variable, --color-<name>, rebuilt in the browser with relative colors, with this palette as the fallback. shopify (v4 only): live, plus a settings_schema.json color setting and the Liquid line for snippets/css-variables.liquid, for Shopify themes where the merchant picks the color in the theme editor. Each part says which file it goes in. Defaults to theme for v4 and config for older versions",
"type": "string",
"enum": [
"theme",
"config",
"css",
"live",
"shopify"
]
},
"plain": {
"description": "With output live or shopify: a plain :root block instead of @theme, for projects without Tailwind (like the Dawn theme)",
"type": "boolean"
},
"semantic": {
"description": "With output live or shopify: also add --color-<name>-foreground for text on the color: white or the darkest shade, whichever contrasts more, following the runtime color",
"type": "boolean"
}
},
"required": [
"color"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The palette as code, ready to paste"
},
"name": {
"type": "string"
},
"tailwindVersion": {
"type": "number"
},
"format": {
"type": "string"
},
"output": {
"type": "string"
},
"inputShade": {
"type": "number",
"description": "Shade that holds the input color unchanged, e.g. 500"
},
"closestTailwindColor": {
"type": "string",
"description": "Tailwind color whose curve the palette follows"
},
"shades": {
"type": "array",
"items": {
"type": "object",
"properties": {
"shade": {
"type": "number"
},
"value": {
"type": "string"
}
},
"required": [
"shade",
"value"
],
"additionalProperties": false
}
},
"readablePairs": {
"description": "Text and background pairs that pass WCAG AA. Use them for text and buttons in this color. Not for live and shopify outputs, whose shades change at runtime",
"type": "array",
"items": {
"type": "object",
"properties": {
"use": {
"type": "string",
"enum": [
"button",
"text",
"badge",
"dark"
],
"description": "dark: text in dark mode"
},
"classes": {
"type": "string",
"description": "e.g. \"bg-brand-600 text-white\""
},
"ratio": {
"type": "number",
"description": "WCAG contrast ratio, 4.5 or more"
},
"level": {
"type": "string",
"enum": [
"AA",
"AAA"
]
}
},
"required": [
"use",
"classes",
"ratio",
"level"
],
"additionalProperties": false
}
},
"avoid": {
"description": "White text on the input color, when it fails WCAG AA",
"type": "object",
"properties": {
"classes": {
"type": "string"
},
"ratio": {
"type": "number"
}
},
"required": [
"classes",
"ratio"
],
"additionalProperties": false
},
"replacesTailwindColor": {
"type": "boolean",
"description": "True when the code replaces a default Tailwind palette (default color name, theme or config output)"
}
},
"required": [
"code",
"name",
"tailwindVersion",
"format",
"output",
"inputShade",
"closestTailwindColor",
"shades",
"replacesTailwindColor"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢find_closest_tailwind_color(color, tailwindVersion)
Finds the shade in Tailwind's default palette that looks most like a given color, e.g. #db4d53 -> red-500. Use it to pick an existing Tailwind class (bg-red-500) instead of an arbitrary value. If the difference is visible, use generate_palette to add the exact color as a custom palette instead.
입력 스키마
{
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Any CSS color: hex (#db4d53), rgb(), hsl(), oklch() or a named color"
},
"tailwindVersion": {
"description": "The project's Tailwind CSS major version. Defaults to 4",
"type": "number",
"enum": [
4,
3,
2,
1
]
}
},
"required": [
"color"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Tailwind color name, e.g. \"red\""
},
"shade": {
"type": "number",
"description": "Closest shade, e.g. 500"
},
"className": {
"type": "string",
"description": "Color part of a utility class, e.g. \"red-400\" for bg-red-400"
},
"tailwindValue": {
"type": "object",
"properties": {
"oklch": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"oklch",
"hex"
],
"additionalProperties": false,
"description": "Tailwind's value for that shade"
},
"input": {
"type": "object",
"properties": {
"oklch": {
"type": "string"
},
"hex": {
"type": "string"
}
},
"required": [
"oklch",
"hex"
],
"additionalProperties": false,
"description": "The input color"
},
"distance": {
"type": "number",
"description": "OKLab distance: 0 is identical, under 0.02 is hard to see"
},
"visiblyDifferent": {
"type": "boolean",
"description": "True when the Tailwind shade looks different from the input"
},
"tailwindVersion": {
"type": "number"
}
},
"required": [
"name",
"shade",
"className",
"tailwindValue",
"input",
"distance",
"visiblyDifferent",
"tailwindVersion"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢get_tailwind_palette(name, tailwindVersion)
Looks up Tailwind's own default colors, exactly as Tailwind defines them: a whole color (e.g. "blue", all shades) or one shade (e.g. "slate-500"), for Tailwind v4, v3, v2 or v1. Use it instead of writing default Tailwind color values from memory. Values are oklch() in v4 and hex in older versions.
입력 스키마
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A default Tailwind color, like \"blue\", or one shade of it, like \"blue-500\""
},
"tailwindVersion": {
"description": "The project's Tailwind CSS major version. Defaults to 4",
"type": "number",
"enum": [
4,
3,
2,
1
]
}
},
"required": [
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Tailwind color name, e.g. \"blue\""
},
"tailwindVersion": {
"type": "number"
},
"shades": {
"type": "array",
"items": {
"type": "object",
"properties": {
"shade": {
"type": "number"
},
"className": {
"type": "string",
"description": "Color part of a utility class, e.g. \"blue-500\" for bg-blue-500"
},
"value": {
"type": "string",
"description": "Tailwind's value: oklch() in v4, hex in older versions"
}
},
"required": [
"shade",
"className",
"value"
],
"additionalProperties": false
},
"description": "All shades, or only the one asked for"
}
},
"required": [
"name",
"tailwindVersion",
"shades"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢list_tailwind_colors(tailwindVersion)
Lists the names of Tailwind's default colors for a Tailwind version (e.g. red, slate, mauve in v4), with the shades each one has and its 500 value as a sample. Use it to see which colors exist before calling get_tailwind_palette or picking a utility class.
입력 스키마
{
"type": "object",
"properties": {
"tailwindVersion": {
"description": "The project's Tailwind CSS major version. Defaults to 4",
"type": "number",
"enum": [
4,
3,
2,
1
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"tailwindVersion": {
"type": "number"
},
"shades": {
"type": "array",
"items": {
"type": "number"
},
"description": "Shades every color has, e.g. 50 to 950"
},
"colors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Color name, e.g. \"red\""
},
"sample": {
"type": "string",
"description": "Tailwind's 500 value: oklch() in v4, hex in older versions"
}
},
"required": [
"name",
"sample"
],
"additionalProperties": false
}
}
},
"required": [
"tailwindVersion",
"shades",
"colors"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢convert_color(color)
Converts any CSS color to oklch(), hex and rgb, formatted like Tailwind (oklch() is what Tailwind v4 uses). Colors outside a format are mapped into it: oklch() to Display P3 like Tailwind's palette, hex and rgb to sRGB. Use it for one value; to add a color with all its shades, call generate_palette instead.
입력 스키마
{
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Any CSS color: hex (#db4d53), rgb(), hsl(), oklch() or a named color"
}
},
"required": [
"color"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}출력 스키마
{
"type": "object",
"properties": {
"oklch": {
"type": "string",
"description": "e.g. oklch(61.6% 0.177 21.62)"
},
"hex": {
"type": "string",
"description": "e.g. #db4d53"
},
"rgb": {
"type": "string",
"description": "e.g. rgb(219, 77, 83)"
}
},
"required": [
"oklch",
"hex",
"rgb"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}커뮤니티
증거