ChromaFit ChromaFit v4.0
Copied to clipboard!
मुफ़्त टूल

यूनिवर्सल रंग परिवर्तक

HEX, RGB, HSL, CMYK, OKLCH और Tailwind रंगों को तुरंत बदलें। बिना किसी भ्रम और विज्ञापन के।

रंग प्रारूप (Formats)

CSS 4
Android
Tailwind v4 Match

bg-blue-500

WCAG अभिगम्यता कंट्रास्ट

WCAG 2.1 मानकों के अनुसार कंट्रास्ट अनुपात और पठनीयता।

सफ़ेद पृष्ठभूमि पर
3.82:1
AA: FAIL
AAA: FAIL
Sample Text on Pure White
काली पृष्ठभूमि पर
5.49:1
AA: PASS
AAA: FAIL
Sample Text on Pure Black

शेड पैलेट (50–950)

आपके डिज़ाइन सिस्टम के लिए संपूर्ण टोनल स्केल। किसी भी शेड पर क्लिक करें और HEX कोड कॉपी करें।

रंग सामंजस्य (Color Harmonies)

रंग चक्र के कोण संबंधों के आधार पर गणना की गई। किसी भी स्वैच पर क्लिक करके लोड करें।

लाइव UI घटक पूर्वावलोकन

देखें कि आपका चुना हुआ रंग वास्तविक बटनों और कार्डों पर कैसा दिखता है।

स्थिति बैज

Mastering Color Formats: HEX, Jetpack Compose, RGB, HSL, CMYK, OKLCH & Tailwind CSS

In modern web engineering, mobile development, and digital product design, color is more than an aesthetic choice—it is a functional system that affects brand consistency, user perception, and accessibility standards. Developers and designers often navigate between completely different color representations depending on whether they are building Android apps with Jetpack Compose, designing for high-refresh-rate OLED displays, writing modern CSS with OKLCH, configuring Tailwind CSS utility classes, or preparing digital artwork for physical 4-color process (CMYK) printing.

sRGB & HEX Representation

The hexadecimal representation (#RRGGBB) and integer RGB (rgb(255, 255, 255)) define red, green, and blue light components on an 8-bit scale (0–255). While universally supported, sRGB suffers from non-uniform perceived brightness across different hues.

OKLCH: The CSS Color 4 Revolution

Introduced in CSS Color Module 4 and adopted natively by Tailwind CSS v4, OKLCH is a perceptually uniform color space. In OKLCH, Lightness (L), Chroma (C), and Hue (H) are decoupled, ensuring that two colors with identical Lightness values look equally bright to the human eye.

Android & Jetpack Compose: The 0xFF Hex Structure

In Android Jetpack Compose and Kotlin Multiplatform (KMP), colors are represented by the androidx.compose.ui.graphics.Color class, initialized with a 32-bit ARGB (Alpha, Red, Green, Blue) integer literal. Unlike standard web hexadecimal notation where the alpha channel is either omitted or appended to the end (#RRGGBBAA), Kotlin Compose expects the alpha byte at the very beginning prefixed by 0x (0xAARRGGBB).

For an opaque color like Tailwind blue (#3B82F6), the alpha channel is 255 (FF in hex), resulting in Color(0xFF3B82F6). For 50% transparency, the alpha byte is 128 (80 in hex), producing Color(0x803B82F6). ChromaFit automatically computes this exact 32-bit ARGB representation so you can copy and paste directly into your Compose UI themes.

Why OKLCH Solves HSL's Major Flaw

For decades, web developers relied on HSL (Hue, Saturation, Lightness) because it seemed more intuitive than raw RGB. However, HSL has a fatal flaw: human perception is non-linear. In HSL, a pure yellow (hsl(60, 100%, 50%)) and a pure blue (hsl(240, 100%, 50%)) have the exact same lightness value (50%), but to the human eye, yellow appears blindingly bright while blue appears deep and dark.

OKLCH fixes this fundamental problem. When you define a color in OKLCH, a lightness of 0.6 represents true perceptual brightness regardless of whether the hue is yellow, blue, red, or green. This makes generating accessible button states, hover variations, and automated 50–950 tonal scales predictable and visually balanced.

Understanding WCAG 2.1 Contrast Standards

Web Content Accessibility Guidelines (WCAG) 2.1 establish mathematical criteria to ensure text remains legible for people with visual impairments or color blindness:

  • WCAG AA (Minimum Contrast): Requires a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text (18pt or 14pt bold).
  • WCAG AAA (Enhanced Contrast): Requires a contrast ratio of 7:1 for normal text and 4.5:1 for large text.

ChromaFit calculates the exact relative luminance based on the IEC 61966-2-1 standard formula, letting you verify AA and AAA compliance with zero guesswork.

Converting for Print: CMYK Subtractive Color

Unlike computer screens which emit light (additive RGB model), printed paper absorbs and reflects light (subtractive CMYK model using Cyan, Magenta, Yellow, and Key/Black ink). When designing printed collateral, digital assets must be translated into CMYK percentages to ensure the physical ink mixture closely replicates the intended digital design.

अक्सर पूछे जाने वाले प्रश्न

OKLCH क्या है और यह क्यों महत्वपूर्ण है?

OKLCH एक आधुनिक रंग प्रारूप है जिसे Tailwind CSS v4 और आधुनिक CSS में अपनाया गया है। यह सभी रंगों में एक समान चमक बनाए रखता है।

Tailwind रंग मिलान कैसे काम करता है?

हम आपके इनपुट रंग की तुलना आधिकारिक Tailwind पैलेट से करके सबसे करीबी क्लास खोजते हैं।

क्या यह मुफ़्त और सुरक्षित है?

हाँ, सभी गणनाएँ सीधे आपके ब्राउज़र में होती हैं। कोई डेटा सर्वर पर नहीं भेजा जाता है।

HEX को RGB या HSL में कैसे बदलें?

बस अपना हेक्स कोड (जैसे #3b82f6) इनपुट बॉक्स में पेस्ट करें। ChromaFit तुरंत इसके 8-बिट RGB और HSL मानों की गणना कर देता है।

क्या मैं कलर पिकर का उपयोग करके सीधे रंग चुन सकता हूँ?

हाँ! सिस्टम का विजुअल कलर पिकर खोलने और कोई भी शेड चुनने के लिए इनपुट बार के बाईं ओर स्थित रंगीन बॉक्स पर क्लिक करें।