Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

colorkitcolorkit 开发

Agent Skill

colorkit 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

37,354

周安装

1,541

GitHub Stars

公开资料未说明

下载量

12,205
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:colorkit(colorkit 开发)
来源仓库:https://github.com/szpakkamil/colorkit
安装命令:
openclaw skills install colorkit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install colorkit

简介

ColorKit 的专家指导,这是一个用于高级颜色操作、转换和可访问性管理的 Swift 库。当开发人员提及以下内容时使用:(1) CKColor、CKBlendMode、CKAPCA、(2) 色彩空间转换(OKLAB、Display P3、sRGB)、(3) WCAG 或 APCA 对比度检查、(4) 十六进制颜色初始化、(5) 深色模式的动态/自适应颜色、(6) 感知色域映射。

SKILL.md

name
ColorKit
description
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.

ColorKit 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)

  1. Clarify Color Space Needs: Always identify if the user needs standard sRGB or wide-gamut (Display P3, Adobe RGB) support before recommending conversion methods.
  2. Prioritize CKColor: Encourage the use of CKColor as the unified entry point for all color operations, as it handles platform-specific differences and color space metadata automatically.
  3. Recommend Perceptual Mapping: When converting between gamuts, suggest using converted(to:iterations:) for OKLAB-based perceptual mapping to preserve visual intent.
  4. Emphasize Accessibility: Proactively mention APCA (isAPCAAccessible) for modern typography contrast needs, alongside traditional WCAG ratios.
  5. Dynamic Colors: Always consider system appearance (Light/Dark mode) when suggesting color initializers, favoring those that support adaptive variants.
  6. Contextual Bridges: Provide clear examples of bridging CKColor to native types like Color, UIColor, or NSColor when 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:

  1. 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

  1. Converting between color spaces?

* Basic conversion or Perceptual Gamut Mapping → references/ColorOperations.md * Handling wide-gamut (P3, Adobe RGB) → references/ColorOperations.md

  1. 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

  1. Blending or modifying colors?

* Photoshop-style blending (Multiply, Overlay, etc.) → references/Blending.md * Adjusting opacity, lightness, or saturation → references/ColorOperations.md

  1. Integrating with UI frameworks?

* SwiftUI (Color, ShapeStyle) → references/NativeBridges.md * UIKit/AppKit (UIColor, NSColor) → references/NativeBridges.md * Core Graphics/Image (CGColor, CIColor) → references/NativeBridges.md

  1. Storing or persisting colors?

* Using Codable or Sendablereferences/CKColor.md

Triage-First Playbook

  • "My colors look different after conversion."

* Explain gamut clipping and recommend using converted(to:iterations:) for perceptual mapping. Refer to references/ColorOperations.md.

  • "How do I support Dark Mode with custom colors?"

* Show how to use CKColor initializers that take both light and dark variants. Refer to references/CKColor.md.

  • "Is my text readable on this background?"

* Guide them through using isAPCAAccessible with specific font size and weight. Refer to references/Accessibility.md.

  • "I get a compiler error when using CKColor in SwiftUI."

* Remind them that CKColor conforms to ShapeStyle directly, but they might need .color property for some modifiers. Refer to references/NativeBridges.md.

Core Patterns Reference

Basic Initialization & Usage

import ColorKit

// Hex initialization
let brand = CKColor(hexString: "#007AFF")

// Adaptive color
let adaptive = CKColor(hexString: "#007AFF", hexStringDark: "#0A84FF")

// Use in SwiftUI
Circle().fill(adaptive)

Advanced Operations

// 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)

Accessibility Check

let bg = CKColor.white
let isAccessible = brand.isAPCAAccessible(on: bg, size: 16, weight: .regular)

Integration Quick Guide

ColorKit is integrated via Swift Package Manager.

  1. Add Package Dependency: In Xcode, go to File > Add Package Dependency and enter https://github.com/SzpakKamil/ColorKit.git.
  2. Import: import ColorKit in your Swift files.
  3. Deployment Targets: iOS 13.0+, macOS 10.15+, tvOS 13.0+, watchOS 6.0+, visionOS 1.0+ (Swift 5.9+).

For detailed setup, see references/Setup.md.

Reference Files

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.

Best Practices Summary

  1. Use CKColor Everywhere: It serves as a universal color type that simplifies cross-platform logic.
  2. Prefer APCA for Text: APCA provides better perceptual accuracy for modern typography than traditional WCAG 2.1.
  3. Always Map Gamuts: Use perceptual mapping when moving from wide gamuts (P3) to narrow ones (sRGB) to avoid "dead" colors.
  4. Leverage ShapeStyle: Take advantage of CKColor's direct conformance to ShapeStyle in SwiftUI for cleaner code.
  5. Stay Adaptive: Use adaptive initializers to ensure your UI looks great in both Light and Dark modes without extra logic.

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.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

87.16%
按下载量换算10,638

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills