get_tailwind_colors
Retrieve TailwindCSS color palette details including shades and hex values for design consistency and development workflows.
Instructions
Get TailwindCSS color palette information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colorName | No | Specific color name (e.g., 'blue', 'red') | |
| includeShades | No | Include all color shades (default: true) |
Implementation Reference
- src/index.ts:412-420 (handler)The handler for the get_tailwind_colors tool, which delegates to the utilityMapper service.
private async handleGetTailwindColors(args: any): Promise<any> { try { const params = this.validateGetColorsParams(args); const colors = await this.utilityMapper.getColors(params); return this.createSuccessResponse(colors); } catch (error) { this.handleServiceError(error, "Failed to get TailwindCSS colors"); } } - src/services/utility-mapper.ts:149-161 (handler)The actual implementation logic that retrieves color information and filters shades if required.
async getColors(params: GetColorsParams): Promise<ColorInfo[]> { let colors = this.getColorInfo(params.colorName); if (!params.includeShades) { // Filter out shade details if requested colors = colors.map(color => ({ ...color, shades: {}, })); } return colors; }