Skip to content
CAI
Software that uses CAICheck a score

sharkdp/pastel

63.5

Adequate · 29 September 2026

6.2k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Pastel is a Rust-based command-line tool and library designed for comprehensive color manipulation and inspection. It supports a wide range of color spaces and conversions, enabling users to display, mix, sort, and generate distinct color palettes directly from the terminal. The system also provides utilities for picking colors from the screen and rendering high-definition ANSI output.

Features

Automated generation of shell completions and man pages at build time

The build process now automatically generates shell completion scripts (for Bash, Zsh, Fish, and PowerShell) and man pages during compilation. This is handled by a new \build.rs\ script that includes the CLI definition and uses \clap\_complete\ and \clap\_mangen\ to produce these documentation artifacts, ensuring they stay in sync with the command-line interface without requiring manual updates.

(repo-wide) · high confidence

Initial release of the pastel CLI tool

This change introduces the initial version of the pastel command-line interface, providing a suite of commands for color manipulation and inspection. Users can now display color information, list named colors, generate random or visually distinct color sets, sort and mix colors, and pick colors from the screen using external tools like gpick, xcolor, or macOS's built-in picker. The tool supports various color spaces (RGB, HSL, Lab, LCh, OkLab, OkLCh) and output formats, including high-definition ANSI canvas rendering for terminal display.

src/cli · high confidence

Initial release of the pastel color library and CLI

This change introduces the core pastel library and its command-line interface, providing comprehensive color manipulation capabilities. It adds support for multiple color spaces (RGB, HSL, HSV, Lab, LCh, OkLab, OkLCh, CMYK, XYZ, LMS) and conversions between them, along with named X11 colors. The library includes ANSI terminal painting (8-bit and 24-bit true color), color distance metrics (CIE76, CIEDE2000), and algorithms for generating distinct color palettes using simulated annealing. The CLI exposes subcommands for showing, mixing, and generating colors.

src · high confidence

Behavioural changes

CLI commands restructured into modular subcommands

The CLI command implementations have been reorganized into a modular structure under \src/cli/commands\, introducing dedicated files for each subcommand (e.g., \color\_commands.rs\, \distinct.rs\, \format.rs\, \gradient.rs\, \paint.rs\, \pick.rs\, \sort.rs\, etc.) and a central \mod.rs\ that wires them together via \GenericCommand\ and \ColorCommand\ traits. This change consolidates command logic, standardizes input handling through \ColorArgIterator\ in \io.rs\, and enables features like streaming input, external color picking, and configurable distance metrics for the \distinct\ command, while maintaining the same user-facing subcommands (e.g., \pastel distinct\, \pastel format\, \pastel paint\).

src/cli/commands · high confidence

Test coverage

Added benchmark suite for color parsing; Added integration tests for color, format, and set commands.

Dependencies

Upgrade to Clap v4 and modernize Rust tooling

The command-line argument parser has been upgraded from Clap v2 to v4, which may require users to adapt to changes in help text formatting or argument parsing behavior. The project also updates its Rust edition to 2021, raises the Minimum Supported Rust Version (MSRV) to 1.83.0, and refreshes other dependencies such as \regex\, \rand\, and \nom\ to their latest compatible versions. Additionally, the build system now includes scripts to auto-generate shell completion scripts and man pages, enhancing the CLI experience.

(dependencies) · high confidence

Housekeeping

Added documentation and demo scripts for color capabilities

Users can now find a new guide in \doc/colorcheck.md\ explaining how to verify terminal support for 24-bit true color mode using the \pastel colorcheck\ command, including expected output and color verification tips. Additionally, a new demo script \doc/demo-scripts/gradient.sh\ is provided to demonstrate text color gradients using the \pastel gradient\ and \pastel paint\ commands.

doc · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 63 (-2.1)
  • Rubric changed (rubric-2026.09.9 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 95 → 95 (+0.0)
  • Architecture 100 → 99 (-0.9)
  • Maturity 55 → 55 (+0.2)
  • Readiness 79 → 60 (-19.1)
  • Security 60 → 73 (+13.5)
  • Performance 80 (new)

Resolved (3)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Hotspot: src/ansi.rs (src/ansi.rs)

New (7)

  • Duplicate functionality with different signatures and input types. The method on Color takes two Color objects and returns a Scalar, while the module-level function takes two Lab objects and returns an f64. This forces users to choose between convenience (auto-conversion) and explicit control, creating redundancy.
  • Inconsistent naming convention for string serialization. Most formats use to_{format}_string, but RGB has three distinct methods (to_rgb_string, to_rgb_float_string, to_rgb_hex_string) with different parameter signatures (Format vs leading_hash: bool). This breaks the pattern established by other color spaces.
  • Low cohesion: Color (LCOM4 6) (src/lib.rs)
  • Outdated: clap
  • Outdated: clap_complete
  • Outdated: once_cell
  • Outdated: regex

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sharkdp/pastel was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 01d4252aa794f1331834948f133e75c64532be46 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-c4983f2d4e5c.