colorkitExpert 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 ClawdBot CLI:
clawdbot install SzpakKamil/colorkitThis 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.
CKColor as the unified entry point for all color operations, as it handles platform-specific differences and color space metadata automatically.converted(to:iterations:) for OKLAB-based perceptual mapping to preserve visual intent.isAPCAAccessible) for modern typography contrast needs, alongside traditional WCAG ratios.CKColor to native types like Color, UIColor, or NSColor when UI integration is the goal.ColorKit's behavior is influenced by the project's deployment targets and Swift version.
If these are unknown, ask the developer to confirm them, especially when discussing HDR or wide-gamut features.
When a developer needs ColorKit guidance, follow this decision tree:
references/CKColor.mdreferences/ColorModels.mdreferences/CKColor.mdreferences/ColorOperations.mdreferences/ColorOperations.mdreferences/Accessibility.mdreferences/Accessibility.mdreferences/Accessibility.mdreferences/Blending.mdreferences/ColorOperations.mdColor, ShapeStyle) β references/NativeBridges.mdUIColor, NSColor) β references/NativeBridges.mdCGColor, CIColor) β references/NativeBridges.mdCodable or Sendable β references/CKColor.mdconverted(to:iterations:) for perceptual mapping. Refer to references/ColorOperations.md.CKColor initializers that take both light and dark variants. Refer to references/CKColor.md.isAPCAAccessible with specific font size and weight. Refer to references/Accessibility.md.CKColor conforms to ShapeStyle directly, but they might need .color property for some modifiers. Refer to references/NativeBridges.md.import ColorKit
// Hex initialization
let brand = CKColor(hexString: "#007AFF")
// Adaptive color
let adaptive = CKColor(hexString: "#007AFF", hexStringDark: "#0A84FF")
// Use in SwiftUI
Circle().fill(adaptive)
// Perceptual conversion to sRGB
let p3 = CKColor(red: 1.0, green: 0.0, blue: 0.0, colorSpace: .displayP3)
let sRGB = p3.converted(to: .sRGB, iterations: 6)
// Blending
let blended = brand.blended(with: .black, mode: .multiply, opacity: 0.5)
let bg = CKColor.white
let isAccessible = brand.isAPCAAccessible(on: bg, size: 16, weight: .regular)
ColorKit is integrated via Swift Package Manager.
https://github.com/SzpakKamil/ColorKit.git.import ColorKit in your Swift files.For detailed setup, see references/Setup.md.
Load these files as needed for specific topics:
ColorKit.md - General overview and key capabilities.Setup.md - Installation and project integration.CKColor.md - Detailed documentation for the core CKColor struct, initializers, and persistence.ColorOperations.md - Conversion, gamut mapping, and basic modifications.ColorModels.md - Using specialized models like OKLAB, HSL, CMYK, etc.NativeBridges.md - Integration with SwiftUI, UIKit, AppKit, and Core Graphics.Accessibility.md - WCAG and APCA contrast calculations and readability checks.Blending.md - Advanced blending modes and transparency handling._index.md - A comprehensive index for all ColorKit reference documentation.CKColor's direct conformance to ShapeStyle in SwiftUI for cleaner code.Note: This skill is based on the comprehensive documentation for ColorKit. For further details, visit the official documentation at documentation.kamilszpak.com/documentation/colorkit/ or the project website at kamilszpak.com/pl/colorkit.
AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Full Windows desktop control. Mouse, keyboard, screenshots - interact with any Windows application like a human.
Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
Build, test, and ship iOS apps with Swift, Xcode, and App Store best practices.
Control macOS GUI apps visually β take screenshots, click, scroll, type. Use when the user asks to interact with any Mac desktop application's graphical interface.
Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.
Write safe Swift code avoiding memory leaks, optional traps, and concurrency bugs.