Skip to content
CAI
Software that uses CAICheck a score

onevcat/Rainbow

66.5

Adequate · 1 October 2026

2.3k

lines of production code

Swift

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Rainbow is a Swift library that applies colored and styled text to terminal output using ANSI escape sequences. It supports a wide range of color formats, including 24-bit true color and HSL, and provides conditional styling capabilities. The system is designed for cross-platform compatibility across macOS, iOS, tvOS, and watchOS, with specific fixes for Windows terminal detection.

Features

Add fastlane automation for macOS releases

Introduced fastlane tooling (Fastfile, Pluginfile, Scanfile) to automate the macOS release process. The new 'release' lane handles version bumping, changelog stamping, Git tagging, and publishing to GitHub Releases and CocoaPods, while the 'test' lane runs Swift Package Manager tests and the 'podpush' lane handles pod specification updates.

fastlane · high confidence

Add interactive playground demonstrating Rainbow library features

Introduces a new Playground/main.swift file that serves as a quick-start demonstration for the Rainbow Swift library. It showcases core capabilities including basic and bright foreground/background colors, text styles (bold, dim, etc.), HSL color support via bit24, and a custom ASCII art hero banner with a smooth color gradient tagline.

Playground · high confidence

Added Xcode schemes for macOS, iOS, tvOS, and watchOS

The project now includes dedicated Xcode schemes for macOS, iOS, tvOS, and watchOS platforms. These new schemes configure the build, test, launch, profile, analyze, and archive actions for each platform's respective framework target, enabling developers to build and test the Rainbow framework across all supported Apple platforms directly from Xcode.

Rainbow.xcodeproj/xcshareddata · high confidence

Initial project structure and source file registration

The Xcode project file is created, establishing the build configuration for the Rainbow library. This includes registering core source files such as Rainbow.swift, Color.swift, Style.swift, and their extensions, as well as test targets and framework products, providing the foundational structure for building and testing the library.

Rainbow.xcodeproj · high confidence

Introduce comprehensive conditional styling and advanced color support

Rainbow now supports conditional styling, allowing users to apply colors, background colors, and styles only when specific conditions are met via new \String\ extension methods (e.g., \colorIf\, \backgroundColorWhen\) and a fluent \ConditionalStyleBuilder\. The library also expands its color capabilities to include 8-bit and 24-bit true color support, hex color conversion, and HSL color conversion, alongside named light background colors. Additionally, it introduces environment variable support for \FORCE\_COLOR\ and \NO\_COLOR\ to control output behavior and adds Windows terminal compatibility.

Sources · high confidence

New fastlane action to commit all changes

Added a new \git\_commit\_all\ action that allows users to commit all unsaved changes to git with a single command. The action accepts a \message\ parameter to specify the commit message, which can be provided via the \FL\_GIT\_COMMIT\_ALL\ environment variable or directly in the Fastfile.

fastlane/actions · high confidence

Behavioural changes

Added Xcode workspace configuration files

The project now includes the standard Xcode workspace configuration files: contents.xcworkspacedata, which references the main project file, and IDEWorkspaceChecks.plist, which enables workspace-level build settings checks. These files are required for proper workspace management in modern versions of Xcode.

Rainbow.xcodeproj/project.xcworkspace · high confidence

Updated Bundler configuration for parallel installation

The project's Bundler configuration has been updated to allow up to 8 parallel jobs during gem installation, which can significantly speed up dependency resolution and installation times.

.bundle · high confidence

Fixes

Release 4.2.2: Fixes for Windows terminal detection and ANSI reset ordering

This release addresses two specific issues with ANSI escape sequence handling. First, Windows terminal detection is now more robust, allowing colors to be enabled even when the \TERM\ environment variable is not set. Second, the ordering of reset codes in compound ANSI SGR sequences has been corrected, ensuring that styles are applied and cleared in the intended order without visual artifacts.

(repo-wide) · high confidence

Test coverage

Added comprehensive test coverage for Rainbow's color, styling, and parsing logic; Added test bundle configuration.

Dependencies

Initial project setup with dependency manifests and package definitions

This change introduces the foundational build and dependency configuration for the project. It adds a Ruby Gemfile and lockfile pinning fastlane, fastlane-plugin-changelog, and CocoaPods (\~\>1.2) along with their transitive dependencies (such as activesupport 7.2.3.1, aws-sdk-s3 1.227.0, and excon 1.5.0). It also adds a Swift Package Manager manifest (Package.swift) defining the 'Rainbow' library and its playground/test targets, and a CocoaPods podspec (RainbowSwift.podspec) specifying version 4.2.2, deployment targets (iOS 15.0, macOS 12.0, etc.), and static framework support.

(dependencies) · high confidence

Housekeeping

Initial Support framework project setup

The Support framework has been initialized with a new Info.plist configuration file. This establishes the basic project metadata, including the bundle identifier, package type (FMWK), and versioning (4.2.2, build 291), preparing the component for integration.

Support · 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 73 → 66 (-7.0)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 99 → 98 (-0.6)
  • Architecture 85 → 94 (+9.3)
  • Maturity 66 → 66 (-0.1)
  • Readiness 69 → 51 (-17.8)
  • Security 93 → 96 (+2.7)

Resolved (2)

  • Documentation: no usage examples (README.md)
  • Outdated: fastlane

New (9)

  • Coverage not measured — Swift suite
  • Duplicated block (6 lines × 2) (Playground/main.swift)
  • Duplicated block (7 lines × 2) (Sources/BackgroundColor.swift)
  • Hotspot: Sources/CodesParser.swift (Sources/CodesParser.swift)
  • Inconsistent naming for background color application. ConditionalStyleStep uses 'backgroundColor(...)' while StyledStringBuilder uses 'applyingBackgroundColor(...)'.
  • Inconsistent naming for color application operations. ConditionalStyleStep uses 'color(...)' while StyledStringBuilder uses 'applyingColor(...)'. This creates a disjointed API surface where similar intent (applying a foreground color) is expressed with different verb structures.
  • Inconsistent naming for low-level/custom modifications. ConditionalStyleStep uses 'transform' for a generic string modification, while StyledStringBuilder uses specific method names like 'bit8', 'bit24', 'hex' for specific color formats. While these are distinct operations, the lack of a consistent 'applying...' prefix in StyledStringBuilder for these specific methods contrasts with 'applyingColor' and 'applyingStyle', creating a mixed naming style within the same type.
  • Inconsistent naming for style application. ConditionalStyleStep uses 'style' (singular) and 'styles' (plural) for single and multiple styles, whereas StyledStringBuilder uses 'applyingStyle' (singular) and 'applyingMultipleStyles' (plural). The verb 'applying' is missing in ConditionalStyleStep.
  • Off the main sequence: Rainbow

Changes since last survey

  • 7 commits — 6 feature/other, 1 fixes

By area

  • (root) — 3 commits
  • (repo) — 2 commits
  • Sources/CodesParser.swift — 2 commits

Notable commits

  • fix: Prepare 4.2.2 release and fix release notes generation
  • change: Bump rubyzip from 2.4.1 to 3.4.0
  • change: Bump version to 4.2.2
  • change: Honor reset ordering in compound SGR sequences
  • change: Merge pull request #101 from rupayon123/contribution/compound-sgr-reset-20260921
  • change: Merge pull request #102 from onevcat/dependabot/bundler/rubyzip-3.4.0
  • change: Preserve reset intent when applying modes to styled text

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

Survey your own repository

onevcat/Rainbow 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 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b6d790f5487f4673fae2222d04d57ff6d6c621ea — 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-e569280dd5e2.