ColorKit
Expert guidance on ColorKit, a Swift library for advanced color manipulation, conversion, and accessibility management. Use when developers mention: (1) CKColor, CKBlendMode, CKAPCA, (2) color space conversion (OKLAB, Display P3, sRGB), (3) WCAG or APCA contrast checks, (4) hex color initialization, (5) dynamic/adaptive colors for Dark Mode, (6) perceptual gamut mapping.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/szpakkamil/colorkitColorKit Skill
Overview
This skill provides expert guidance on ColorKit, a powerful, cross-platform Swift library for advanced color management. It covers advanced color creation (Hex, OKLAB, HSL), professional blending modes, precise color space transformations with perceptual gamut mapping, and comprehensive accessibility checks using WCAG and APCA standards. Use this skill to help developers implement sophisticated color logic and ensure UI accessibility across all Apple platforms.
Agent Behavior (Follow These Rules)
- Clarify Color Space Needs: Always identify if the user needs standard sRGB or wide-gamut (Display P3, Adobe RGB) support before recommending conversion methods.
- Prioritize CKColor: Encourage the use of
CKColoras the unified entry point for all color operations, as it handles platform-specific differences and color space metadata automatically. - Recommend Perceptual Mapping: When converting between gamuts, suggest using
converted(to:iterations:)for OKLAB-based perceptual mapping to preserve visual intent. - Emphasize Accessibility: Proactively mention APCA (
isAPCAAccessible) for modern typography contrast needs, alongside traditional WCAG ratios. - Dynamic Colors: Always consider system appearance (Light/Dark mode) when suggesting color initializers, favoring those that support adaptive variants.
- Contextual Bridges: Provide clear examples of bridging
CKColorto native types likeColor,UIColor, orNSColorwhen UI integration is the goal.
Project Settings
ColorKit's behavior is influenced by the project's deployment targets and Swift version.
- Deployment Targets: iOS 13.0+, macOS 10.15+, tvOS 13.0+, watchOS 6.0+, and visionOS 1.0+.
- Swift Version: Requires Swift 5.9+.
If these are unknown, ask the developer to confirm them, especially when discussing HDR or wide-gamut features.
Quick Decision Tree
When a developer needs ColorKit guidance, follow this decision tree:
-
Creating a new color?
- From Hex string/int →
references/CKColor.md - Using specific models (OKLAB, HSL, CMYK) →
references/ColorModels.md - Adaptive for Light/Dark mode →
references/CKColor.md
- From Hex string/int →
-
Converting between color spaces?
- Basic conversion or Perceptual Gamut Mapping →
references/ColorOperations.md - Handling wide-gamut (P3, Adobe RGB) →
references/ColorOperations.md
- Basic conversion or Perceptual Gamut Mapping →
-
Performing accessibility checks?
- WCAG 2.1 Contrast Ratio →
references/Accessibility.md - APCA (WCAG 3.0) Perceptual Contrast →
references/Accessibility.md - Font-specific readability →
references/Accessibility.md
- WCAG 2.1 Contrast Ratio →
-
Blending or modifying colors?
- Photoshop-style blending (Multiply, Overlay, etc.) →
references/Blending.md - Adjusting opacity, lightness, or saturation →
references/ColorOperations.md
- Photoshop-style blending (Multiply, Overlay, etc.) →
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-szpakkamil-colorkit": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
PagerKit
Expert guidance on PagerKit, a SwiftUI library for advanced, customizable page-based navigation. Use when developers mention: (1) PagerKit, PKPagesView, PKPage, (2) custom page controls, indicators, or paging behavior, (3) cross-platform SwiftUI paging, (4) dynamic page generation, (5) integrating page views into custom layouts, (6) specific PagerKit modifiers or enums, (7) page view controller options, (8) event handling for page changes.
SearchBar
Expert guidance on SearchBar, a customizable SwiftUI search component. Use when developers mention: (1) SearchBar, (2) custom search bars in SwiftUI, (3) search tokens or suggestions, (4) styling search bars (glass, capsule), (5) cross-platform search (iOS, macOS, visionOS), (6) specific SearchBar modifiers like .searchBarStyle or .searchBarSuggestions.
SymbolPicker
Expert guidance on SymbolPicker, a native SwiftUI SF Symbol picker. Use when developers mention: (1) SymbolPicker, (2) selecting SF Symbols, (3) picking symbols with colors, (4) customizing symbol picker appearance, (5) cross-platform symbol selection (iOS, macOS, visionOS), (6) specific modifiers like .symbolPickerSymbolsStyle or .symbolPickerDismiss.