color

color is a command for Claude Code from coltonbearden/carrel. It costs 44 tokens per session (917 once invoked), scanned A, original, MIT.

A command-line tool for examining and changing image colors. It can find dominant colors, calculate WCAG contrast between two colors, and convert an image to a color profile such as CMYK, gray, P3, or sRGB.

In plain words
What is it for?
Use it to extract color palettes, check WCAG contrast ratios, or convert images while embedding an ICC color profile.
Why use it?
It helps identify an image's main colors and check whether foreground and background colors have enough contrast for accessibility. Profile conversion makes the target color space explicit in the output.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-documents plugin — 1 skill, 5 commands, 1 agent shipped together

Good fit Use it to extract color palettes, check WCAG contrast ratios, or convert…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/coltonbearden/carrel/color
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/coltonbearden/carrel

Made for: Claude Code.

Or install carrel-documents, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for color

README.md
[![agentmods](https://agentmods.dev/badge/commands/coltonbearden/carrel/color.svg)](https://agentmods.dev/commands/coltonbearden/carrel/color)
Your own site
<a href="https://agentmods.dev/commands/coltonbearden/carrel/color"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/color.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 917 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00917
Opus 5 $0.00022 $0.00458
Sonnet 5 $0.00009 $0.00183
Haiku 4.5 $0.00004 $0.00092

Measured yesterday against content hash dafd5cafac0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

color scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/carrel-documents/commands/color.md · 74 lines

What it actually says

Handle this color request: $ARGUMENTS

Run the carrel CLI via Bash. carrel color is a group with palette, check and convert; map the user's request onto the real subcommands and flags in the --help blocks below (regenerated from the CLI by scripts/sync_plugins.py; if the installed carrel color --help differs, trust the installed version — never invent flags):

Usage: carrel color [OPTIONS] COMMAND [ARGS]...

  Color tools: dominant palette, ICC profile conversion, WCAG contrast.

Options:
  --json  Machine-readable JSON output.
  --help  Show this message and exit.

Commands:
  check    WCAG contrast ratio of FG on BG (hex colors, e.g.
  convert  Convert SRC into an ICC profile and embed the profile in the output.
  palette  Dominant colors of SRC as hex + proportion (median-cut quantization).
Usage: carrel color check [OPTIONS] FG BG

  WCAG contrast ratio of FG on BG (hex colors, e.g. #333 #fafafa).

Options:
  --json  Machine-readable JSON output.
  --help  Show this message and exit.
Usage: carrel color convert [OPTIONS] SRC

  Convert SRC into an ICC profile and embed the profile in the output.

  CMYK targets are written as JPEG/TIFF (PNG cannot store CMYK).

Options:
  --to-profile P  Target ICC profile: .icc path or builtin alias (cmyk, gray, p3, srgb).  [required]
  -o, --out FILE  Output path [default: <SRC>.<profile>.png/.jpg].
  --json          Machine-readable JSON output.
  --help          Show this message and exit.
Usage: carrel color palette [OPTIONS] SRC

  Dominant colors of SRC as hex + proportion (median-cut quantization).

  Human mode shows rich color swatches; --json prints one JSON array of {"hex", "proportion"} sorted
  by coverage.

Options:
  --n INTEGER RANGE  Number of colors to extract.  [default: 8; 1<=x<=256]
  --json             Machine-readable JSON output.
  --help             Show this message and exit.
  • palette SRC (--n, default 8): dominant colors as [{hex, proportion}] sorted by coverage (median-cut). Good for "what are this image's brand colors" — present them as hex codes with rough percentages, largest first.
  • check FG BG: WCAG contrast ratio of two hex colors (#333 #fafafa). Report the ratio and whether it passes AA (4.5:1 normal text, 3:1 large text) and AAA (7:1); when it fails, propose a darker/lighter variant and re-check it.
  • convert SRC --to-profile P: converts into an ICC profile (.icc path or alias cmyk, gray, p3, srgb) and embeds it. CMYK output is written as JPEG/TIFF because PNG cannot store CMYK. Output defaults to <SRC>.<profile>.png/.jpg; the original is never modified. To preview a profile without converting, use carrel proof instead.

Use --json for every subcommand and interpret the result conversationally. Exit code 4 means the input is not an image or a color could not be parsed — ask for a valid hex value.

Requires the carrel CLI on PATH. If carrel is not found, tell the user to install it with uv tool install carrel (see the repo's INSTALL notes), or run it as uv run carrel ... from the carrel repo root.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 74 lines · 44 tokens per session scan A dafd5cafac0d

Subscribe to this mod's changes

color is a command published in the GitHub repository coltonbearden/carrel (1 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 917 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.