LaunchKit · 2026
Back to Skills

Expert guidance on ColorKit, a Swift library for advanced color manipulation, conversion, and accessibility.

0
774 downloads
by @szpakkamil

Setup & Installation

openclaw skills install @szpakkamil/colorkit

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install colorkit

What This Skill Does

ColorKit is a Swift library for color manipulation, conversion, and accessibility checking across Apple platforms. It offers a CKColor type that handles color spaces like OKLAB and Display P3, adaptive Light/Dark mode variants, and contrast validation via WCAG and APCA standards.

It combines color space conversion, perceptual gamut mapping, APCA/WCAG contrast checks, and SwiftUI/UIKit bridging in one library, removing the need for separate utilities or manual contrast math.

When to use it

  • Checking APCA contrast ratios for text on custom backgrounds
  • Converting Display P3 wide-gamut colors to sRGB without gamut clipping
  • Creating adaptive hex colors that respond to Light and Dark mode
  • Blending two colors with Multiply or Overlay modes in a design system
  • Persisting brand colors as Codable values across app sessions

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Is my #007AFF label readable on a white background at 16pt regular weight?

AGENT
  1. 1Initialize CKColor from hex string "#007AFF"
  2. 2Reference CKColor.white as the background
  3. 3Call isAPCAAccessible(on: background, size: 16, weight: .regular)
  4. 4Return the boolean result and explain the APCA threshold for that font size and weight
OUTPUT

A boolean indicating whether the color meets APCA contrast requirements, with guidance on adjusting color or font weight if it does not