
color-space
io.github.colorjs由 GitHub 账号 colorjs 发布v3.5.0更新于 Oct 24, 2026
Conversions across 221 color spaces, tested against cited sources: CSS strings, gamut, LUTs
概览
本地 MCP 服务器,提供经来源验证的色彩空间运算,让助手在 221 个色彩空间之间转换颜色、检查色域,并生成 CSS、着色器、LUT 或 ICC 配置。
- 可以做什么
- 在 221 个互通的色彩空间之间转换颜色,输入可为 CSS 字符串或通道数值
- 检查色域并查看色彩空间元数据,如通道范围与出处
- 解析与格式化 CSS 颜色、混色、计算 deltaE 与 WCAG 对比度、模拟色觉缺陷
- 生成 GLSL、WGSL、HLSL 或 MSL 着色器代码,以及对应的 JS 调用与色彩科学等价写法
- 输出 .cube LUT、ICC 配置和 OpenColorIO 色彩空间,供调色与 DCC 工具使用
- 适用场景
- 适合需要精确、经来源验证的色彩换算而非估算数值的任务:网页与 CSS 颜色、广色域与 HDR 视频流程、摄影机 Log 素材、印刷,或生成着色器与 LUT 资源。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js;未声明认证、环境变量或请求头。也可在 localhost 启动可选的 HTTP 模式,或构建 Docker 镜像。
安装
在 SourceWeft 中
- 打开 控制台中的 color-space,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
color-space [test] [npm] [size] [VS Code]
[the Ostwald hue circle at full color, shown continuously and in ten steps]
Open collection of color spaces.
- Formulas tested against cited sources
- Conventional ranges
- JS with TypeScript types / WASM / GLSL / LUT / ICC / OCIO
Use
Individual spaces:
Imports
color-space– All 221 interconnected spaces. 70 kB gzipcolor-space/<name>.js– One standalone spacecolor-space/lite– 54-space working set. 29 kB gzipcolor-space/wasm– lite set as WASM, bare.wasmincludedcolor-space/gl– GLSL/WGSL shader sourcecolor-space/gl/hlsl·color-space/gl/msl– HLSL (DirectX, Unity, Unreal) and Metal, written by naga from the WGSL.await hlsl('rgb', 'oklch'). needs the optional peernaga-wasm(it declares Node ≥ 24.12; CI runs it on 22, where npm only warns)color-space/lut–.cubeLUTs for Resolve, Premiere, OBS, ffmpeg — verified vs ACEScolor-space/icc– Matrix + TRC or CLUT profilescolor-space/ocio– OpenColorIO colorspaces for Blender, Nuke, Resolve, Houdini:colorspace(space.sgamut3cine), curve and matrix from native transforms, 55 spaces, each checked against the library to 1e-6color-space/util–parse,formatCSS colors,mix,gamut,visible,deltaE,contrast(WCAG),cvd(color-vision simulation),deltaE('rgb', [255, 0, 0], [250, 0, 0])color-space/data.json– Channels, ranges, provenance, references, graph, gamutscolor-space/conformance.json– Cited reference conversions, each with its source, to test any color library againstnpx color-space rgb oklch 255 128 0– CLI, no install:convert(default),cube,icc,space,spaces,mcp(MCP server for agents)
Agents
MCP tools – convert, gamut, css, space, spaces, cube, shader, icc, code – so agents call verified math instead of guessing it. A color goes in as any CSS string ('#ff8000', 'oklch(0.7 0.1 50)', 'rebeccapurple') or as channel values; shader writes the conversion as GLSL, WGSL, HLSL or MSL, code gives the JS call and its verified colour-science equivalent.
Claude Desktop claude_desktop_config.json, any project .mcp.json:
Claude Code plugin (the server plus a skill): /plugin marketplace add colorjs/color-space, then /plugin install color-space@color-space. Docker: docker build -t color-space-mcp . and run it with docker run -i --rm color-space-mcp.
Over HTTP (Streamable HTTP, stateless): npx -y color-space mcp --http 8787 on localhost, or host fetch from color-space/mcp.js in a Worker, Deno or Bun. Skill for agents that load skills: plugins/claude/skills/color-space.
In the browser: color-space.io registers the same tools (but icc) through WebMCP where Chrome offers it, plus show, which opens a space's dossier or sets the page's color in front of the person.
Spaces
Motivation
A complete collection of color spaces: one minimal API, formulas tested against their sources. While alternatives focus on digital color spaces, this project takes broader perspective, covering historical and cross-disciplinary spaces as well. Side effects: errata in papers, color education, test cases for JS→WASM compilers (porffor, jz).
It is not a color toolbox — gamut mapping, palettes, alpha stay out; the few tools the atlas itself uses (parsing, mixing, ΔE, contrast, color-vision simulation) are color-space/util. Pantone, NCS, RAL Classic, and similar licensed swatch catalogs aren't open and stay out as well.
Contributing
A wrong value or a missing space: open an issue with the document that defines it. How a space is added and checked: CONTRIBUTING.md.
Credits
Thanks to the researchers, theorists, specifiers, implementors and the libraries that helped this one happen.
来源:README.md,提交 d572b38
工具
0版本历史
2- v3.5.0最新Oct 20, 2026
- v3.3.0Oct 15, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分