@dennisk2025/random-color-generator
v1.0.0
Published
Generates one or more random colors in various formats (hex, RGB, HSL) via MCP server. Useful for design, testing, or creative applications.
Readme
random-color-generator
Generates one or more random colors in various formats (hex, RGB, HSL) via the Model Context Protocol (MCP) server. Useful for design, testing, or creative applications.
Installation
You can use this MCP server directly using npx or install it as a dependency:
npx @dennisk2025/random-color-generatoror
npm install @dennisk2025/random-color-generatorAdding to Claude Desktop
Add the following to your Claude Desktop config file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"random-color": {
"command": "npx",
"args": ["@dennisk2025/random-color-generator"]
}
}
}Now you can use the tools from this MCP server via Claude Desktop!
Available Tools
1. generate_random_colors
Description: Generates a list of random colors in specified formats.
Parameters:
count(integer, optional): Number of random colors to generate (default: 1, min: 1, max: 100)formats(array of strings, optional): Color formats to return per color. You may include any of:hexrgbhsl
Example Call:
Tool: generate_random_colors
Parameters: { "count": 3, "formats": ["hex", "rgb"] }Result:
{
"colors": [
{ "hex": "#12ab34", "rgb": "rgb(18, 171, 52)" },
{ "hex": "#785a21", "rgb": "rgb(120, 90, 33)" },
{ "hex": "#a1bb03", "rgb": "rgb(161, 187, 3)" }
]
}Example: Only one color in all formats
Tool: generate_random_colors
Parameters: { "formats": ["hex", "hsl", "rgb"] }Result:
{
"colors": [
{ "hex": "#ff22cc", "rgb": "rgb(255, 34, 204)", "hsl": "hsl(314, 100%, 57%)" }
]
}Usage Notes
- If you omit the
formatsparameter, only thehexcode will be returned. - The result JSON always returns a
colorsarray of lengthcount. - Minimum
countis 1, maximum is 100. - Supported formats:
hex,rgb,hsl.
Enjoy generating random, valid web colors for your projects, presentations, or inspiration!
