做什么
网络项目的 OKLCH 色彩空间 。 将 hex/rgb/hsl 转换为 oklch , 生成调色板, 检查对比度, 处理 Gamut 边界, 并与 Tailwind v4 的主题 。 在oklch上的触发器,颜色转换,调色板生成,对比比,gamut,显示p3,设计符号,hue漂移,铬,暗模式颜色.
技能库 智客分类:设计创意 oklch-skill
网络项目的 OKLCH 色彩空间 。 将 hex/rgb/hsl 转换为 oklch , 生成调色板, 检查对比度, 处理 Gamut 边界, 并与 Tailwind v4 的主题 。 在oklch上的触发器,颜色转换,调色板生成,对比比,gamut,显示p3,设计符号,hue漂移,铬,暗模式颜色.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
网络项目的 OKLCH 色彩空间 。 将 hex/rgb/hsl 转换为 oklch , 生成调色板, 检查对比度, 处理 Gamut 边界, 并与 Tailwind v4 的主题 。 在oklch上的触发器,颜色转换,调色板生成,对比比,gamut,显示p3,设计符号,hue漂移,铬,暗模式颜色.
参考文献
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:OKLCH Colors、Quick Reference、Why OKLCH、OKLCH Syntax、Key Thresholds、Review Output Format。
文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。
OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, hue drift, chroma, dark mode colors.
OKLCH ColorsQuick ReferenceWhy OKLCHOKLCH SyntaxKey ThresholdsReview Output FormatCommon MistakesReference Files
来源分类:skills.sh agent-skill
nameoklch-skilldescription具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「oklch-skill」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-4deb98fdfb1d84c2-%E5%A5%A5%E5%85%8B%E5%A5%87%E6%8A%80%E8%83%BD.html 请存为 .cursor/skills/oklch-skill/SKILL.md 或 .claude/skills/oklch-skill/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/jakubkrehel/oklch-skill' --list
npx skills add 'https://github.com/jakubkrehel/oklch-skill' --skill 'oklch-skill'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean. Most color problems in CSS — broken palettes, failing contrast, hue drift — come from using color spaces that don't match how we see. OKLCH fixes the model so the tools work. To explore interactively, visit oklch.fyi.
| Category | When to use | Reference |
| --- | --- | --- |
| Conversion | Hex/rgb/hsl to oklch | color-conversion.md |
| Palettes | Generate scales, multi-hue, dark mode | palette-generation.md |
| Contrast | APCA/WCAG checks, fixing failing contrast | accessibility-contrast.md |
| Gamut & Tailwind | P3 fallbacks, @theme scales, gamut clamping | gamut-and-tailwind.md |
oklch(0.5 ...) is visually mid. HSL's lightness: 50% varies wildly by hue.oklch(L C H)
oklch(L C H / alpha)
| Channel | Range | Description | | --- | --- | --- | | L (Lightness) | 0–1 | 0 = black, 1 = white. Perceptually uniform. | | C (Chroma) | 0–~0.4 | Colorfulness. 0 = gray. Max depends on L and H. | | H (Hue) | 0–360 | Hue angle in degrees. | | alpha | 0–1 | Optional transparency. Slash syntax. |
oklch(0.637 0.237 25.331)
oklch(0.8 0.05 200 / 0.5)
Formatting: L and C use 3 decimal places, H uses up to 3. Drop trailing zeros. Format -0 as 0. Browser support: Baseline 2023, 96%+ global coverage.
| Rule | Value | | --- | --- | | Light/dark boundary | L > 0.6 = light background → use dark text | | Lightness gap (light bg) | Foreground L < 0.45 when background L > 0.85 | | Lightness gap (dark bg) | Foreground L > 0.75 when background L < 0.25 | | Hue drift threshold | > 10° spread across palette steps = visible drift | | APCA normal text | |Lc| >= 60 to pass, >= 75 for pass+ | | WCAG 2 normal text | 4.5:1 AA, 7:1 AAA | | Contrast fix | Adjust L only — chroma has negligible effect |
Always present color changes as a markdown table with Before and After columns. Include every color that was changed — not just a subset. Never list findings as separate "Before:" / "After:" lines outside of a table.
| Before | After |
| --- | --- |
| color: #3b82f6 | color: oklch(0.623 0.188 259.815) |
| Same absolute C across hues | Same C% of each hue's max chroma |
| No sRGB fallback for P3 color | @media (color-gamut: p3) wrapper |
This keeps feedback scannable and diff-friendly. Each row is a self-contained change the developer can act on independently.
| Issue | Fix |
| --- | --- |
| Hex/rgb/hsl color in new code | Convert to oklch() |
| HSL palette ramp with hue drift | Rebuild with constant oklch hue |
| Failing contrast (check foreground vs its background using APCA) | Adjust oklch L channel, keep C and H |
| High chroma without gamut check | Clamp to max chroma for the L/H in sRGB |
| Same absolute C across different hues | Use same C% (percentage of max) for consistent vividness |
| P3 color without sRGB fallback | Add @media (color-gamut: p3) pattern |
| Dark mode with hand-picked colors | Derive from light palette by reversing L mapping |
| Hex in Tailwind v4 @theme | Convert to oklch values |
| Alpha with comma syntax | Use slash: oklch(L C H / alpha) |
设计创意
设计和实施自动化工作流程,以节省时间和规模化操作作为独家. 用于识别重复任务实现自动化,构建跨工具的工作流程,设置触发器和行动,或优化现有自动化. 包括自动化机会识别,工作流程设计,工具选择(Zapier,Make,n8n),测试,和维护. 触发"自动","自动","工作流程自动…
设计创意
UI/UX设计智能及建筑抛光接口实施指导. 当用户要求UI设计,UX流量,信息架构,视觉风格方向,设计系统/托盘,组件规格,副本/显微镜,可访问性,或生成/critique/refine前端UI(HTML/CSS/JS,React,Next.js,Vue,Svelte,Tailw…
设计创意
创建美丽现代UI的专家前端设计指南. 在构建起落架页面,仪表板,或任何用户界面时使用.
设计创意
设计和输出 n8n 工作流程 JSON 有强力触发器, idempotency, 错误处理, 记录, 重试, 以及 人入"一站"审查队列. 当您需要可审计的自动化时使用.