मुख्य सामग्री पर जाएँ
Skillpedia
ब्रांडिंग12k · #11510

better-colors

यह क्या करती है

यह AI को रंगों को hex, RGB, HSL और OKLCH में बदलने, पैलेट बनाने, कॉन्ट्रास्ट जाँचने और अर्थपूर्ण तरीके से रंग लगाने के चरण समझाती है। यह वेब इंटरफ़ेस को स्टाइल करने वाले डिज़ाइनरों और डेवलपर्स के लिए है।

कब इस्तेमाल करें

  • ✓जब आपको hex, RGB, HSL और OKLCH के बीच रंग बदलने हों।
  • ✓जब आप रंग पैलेट या डार्क मोड के रंग बनाना चाहते हैं।
  • ✓जब आपको जाँचना हो कि टेक्स्ट और बैकग्राउंड के रंगों में पर्याप्त कॉन्ट्रास्ट है या नहीं।

Skill का लिंक

https://github.com/trycompai/crm/blob/release/.agents/skills/better-colors/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/trycompai/crm/blob/release/.agents/skills/better-colors/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप मेरे ऐप के लिए लाइट और डार्क रंग पैलेट बना सकते हैं और जाँच सकते हैं कि टेक्स्ट कॉन्ट्रास्ट पढ़ने लायक है?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI प्रोजेक्ट की मौजूदा रंग प्रणाली बनाए रखता है, परसेप्चुअल कलर स्पेस में पैलेट बनाता है और सुधार सुझाने से पहले कॉन्ट्रास्ट मापता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

OKLCH Colors

OKLCH is a perceptually uniform color space where lightness, chroma, and hue are useful design controls. Use it when the project already uses OKLCH, when creating a new color system, or when the user asks for conversion or palette work. Otherwise preserve the project's established tokens and notation: a consistent hex or RGB token system is better than introducing a second color representation for an isolated fix. To explore interactively, visit oklch.fyi.

Quick Reference

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, reporting failures, fixing on request accessibility-contrast.md
Gamut & Tailwind P3 fallbacks, @theme scales, gamut clamping gamut-and-tailwind.md
Usage Semantic tokens, one meaning per color, primary-action emphasis, appearance variants color-usage.md

Core Principles

1. Use a Perceptual Color Space

  • Respect the existing system. Do not convert notation merely because this skill was loaded. Reuse the project's semantic tokens and authoring format unless the task includes a color-system migration.
  • Perceptual uniformity. Equal L steps = equal brightness. oklch(0.5 ...) is visually mid. HSL's lightness: 50% varies wildly by hue.
  • Stable hue. HSL blue shifts toward purple as lightness changes. OKLCH hue stays constant across the full lightness range.
  • Independent chroma. Chroma is an absolute measure of colorfulness that doesn't depend on lightness. HSL saturation does.
  • Finite gamut. Not every oklch value maps to a displayable sRGB color. High-chroma values at certain hues will clip; gamut awareness is required.

2. Write and Format OKLCH Consistently

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)

Use three decimal places for L and C and up to three for H. Drop trailing zeros and format -0 as 0. OKLCH is Baseline 2023; when support requirements are unusually broad, check the target project's browser matrix instead of relying on a fixed global-coverage percentage.

3. Measure Contrast, Gamut, and Palette Behavior

Rule Value
Light/dark boundary L > 0.73 = light background → dark text; below it, light text still scores higher
Lightness gap (light bg) Foreground L < 0.35 when background L > 0.9
Lightness gap (dark bg) Foreground L > 0.9 when background L < 0.25
Hue drift threshold > 10° spread across palette steps = visible drift
APCA body text |Lc| >= 75 minimum, >= 90 preferred
APCA non-body text |Lc| >= 60 minimum
WCAG 2 normal text 4.5:1 AA, 7:1 AAA
Contrast fix (only when asked) Adjust L first; preserve C and H when possible, then remeasure the rendered pair

Common Mistakes

Issue Fix
Raw color bypasses the project's semantic token system Reuse or add the correct role token in the project's existing notation
Isolated OKLCH value introduced into a hex/RGB codebase Preserve the established notation unless the task includes a color-system migration
HSL palette ramp with hue drift Rebuild with constant oklch hue
Failing contrast (check foreground vs its background using APCA) Report the pair, its measured Lc and the threshold it misses; change colors only when asked (then adjust L, 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 created by mechanically reversing the light palette Use the light palette as a starting point, then tune chroma and lightness and recheck every foreground/background pair
Hex in Tailwind v4 @theme Convert to oklch values
Alpha with comma syntax Use slash: `oklch(
अक्सर पूछे जाने वाले सवाल

क्या यह मेरे प्रोजेक्ट को OKLCH पर ले जाएगी?

नहीं। स्किल प्रोजेक्ट का मौजूदा रंग फ़ॉर्मेट रखती है, जब तक आप माइग्रेशन न माँगें।

यह कॉन्ट्रास्ट कैसे जाँचती है?

यह APCA या WCAG कॉन्ट्रास्ट जाँच इस्तेमाल करती है और विफल जाँचों की रिपोर्ट देती है, और सुधार तभी करती है जब आप माँगें।

OKLCH क्या है?

यह एक कलर स्पेस है जिसमें लाइटनेस, क्रोमा और ह्यू को नियंत्रित करना आसान रहता है, जिससे संतुलित पैलेट बनते हैं।

जानकारी

लेखक का मूल विवरण

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

repo: trycompai/crm

लोकप्रियता

GitHub स्टार
12k
रैंकिंग में स्थान
#11510
लाइसेंस
MIT
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

ai-elements

12k

यह आपके एजेंट को बातचीत, संदेश, टूल डिस्प्ले और प्रॉम्प्ट इनपुट के लिए तैयार कॉम्पोनेंट से AI चैट इंटरफ़ेस बनाने में मदद करती है।

कोडिंगवेबसाइट और UI (frontend)

ai-sdk

12k

यह आपके एजेंट को Vercel AI SDK से AI फ़ीचर बनाने में मदद करती है, जिसमें टेक्स्ट जनरेशन, स्ट्रीमिंग, टूल कॉलिंग और एजेंट शामिल हैं।

AI और एजेंटएजेंट

better-accessibility

12k

यह आपके एजेंट को इंटरफ़ेस को कीबोर्ड और स्क्रीन रीडर के लिए उपयोगी बनाने में मदद करती है, जिसमें फ़ोकस, लेबल, ARIA और फ़ॉर्म शामिल हैं।

डिज़ाइनइंटरफ़ेस (UI/UX)

better-auth-best-practices

12k

यह आपके एजेंट को TypeScript ऐप में लॉगिन, सेशन, OAuth और प्लगइन के लिए Better Auth सेट करने में मदद करती है, उसके दस्तावेज़ी चरणों के अनुसार।

कोडिंगसिक्योरिटी

मिलती-जुलती skills