get_color_palette
Retrieve the complete color palette from Korea's government digital design system (KRDS) for use in official digital services and UI development.
Instructions
KRDS 전체 색상 팔레트를 가져옵니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/token-provider.ts:32-34 (handler)Core handler function implementing the get_color_palette tool logic by searching for 'color' tokens using the KRDSLoader.
export async function getColorPalette(loader: KRDSLoader): Promise<TokenSearchResult[]> { return await loader.searchTokens('color'); } - src/index.ts:313-325 (handler)MCP server handler for the get_color_palette tool, which calls the core getColorPalette function and formats the output as a formatted text response.
private async handleGetColorPalette() { const colors = await getColorPalette(this.loader); const text = `KRDS 색상 팔레트 (${colors.length}개):\n\n` + colors.slice(0, 30).map(color => `🎨 ${color.name}: ${color.value}` ).join('\n') + (colors.length > 30 ? `\n\n... 그 외 ${colors.length - 30}개 색상` : ''); return { content: [{ type: 'text', text }], }; } - src/index.ts:168-175 (registration)Registration of the get_color_palette tool in the tools list, including name, description, and input schema (empty object).
{ name: 'get_color_palette', description: 'KRDS 전체 색상 팔레트를 가져옵니다.', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:72-73 (registration)Switch case in tool call handler that routes 'get_color_palette' requests to the specific handler method.
case 'get_color_palette': return await this.handleGetColorPalette(); - src/index.ts:171-174 (schema)Input schema definition for the get_color_palette tool (accepts no parameters).
inputSchema: { type: 'object', properties: {}, },