Color theory essentials
Every color can be described by three properties. Hue is its position on the color wheel (red, orange, blue…). Lightness (or value) is how close it is to white or black. Chroma (or saturation) is how intense it is compared with a gray of the same lightness. Most palette problems are lightness problems: colors with different hues but identical lightness blur together, especially in grayscale or for people with color vision deficiencies.
Harmonies are reliable starting points because they are geometric relationships on the wheel:
- Monochromatic — one hue in several lightness steps. Cohesive and calm. Shades generator →
- Analogous — neighbouring hues within about 60°. Natural and soft. Analogous generator →
- Complementary — opposite hues. Maximum contrast; use one as an accent. Complementary finder →
- Split-complementary — a hue plus the two beside its complement. Vivid but easier to balance.
- Triadic and tetradic — three or four evenly spaced hues. Playful; let one color dominate.
ColorMoodHub computes harmonies in OKLCH, a perceptually uniform color space, so rotating hue keeps perceived lightness stable. That is why a complementary color generated here looks equally “heavy” as the original.
Accessible color
WCAG 2.2 defines contrast as a ratio between the relative luminance of two colors, from 1:1 (identical) to 21:1 (black on white). Level AA requires 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold) and for meaningful UI components such as input borders and icons. Level AAA raises text requirements to 7:1 and 4.5:1.
Contrast is not the only consideration. Around 1 in 12 men has a color vision deficiency, most commonly reduced sensitivity to green (deuteranomaly). Never rely on hue alone to convey meaning — pair color with text labels, icons, patterns or a clear lightness difference.
- Check a text/background pair
- Test every pair in a palette
- Simulate color blindness on a palette or image
- Generate a palette that passes by design
Building a brand palette
A usable brand system has more than a logo color. Plan for these roles:
- Primary — the color people associate with you; used for key actions.
- Secondary and accent — support and highlight without competing with the primary.
- Neutrals — 8–10 steps from near-white to near-black, ideally tinted slightly with your brand hue. Most of any interface is neutral.
- Semantic colors — success, warning, error and info, tuned to sit comfortably beside the brand.
- Scales — each role from 50 (lightest) to 950 (darkest), so you have backgrounds, borders, hover states and text colors ready.
Test the system on real layouts before committing — a color that looks great as a swatch can overwhelm a full page. Brand Kit Builder → · Design Preview Studio →
Palettes in code
Store colors as CSS custom properties so every component reads from one source of truth. Adding channel variables lets you create transparent variants without new colors:
In Tailwind CSS, extend the theme with a full 50–950 scale per color so utilities like bg-brand-50 and text-brand-900 exist. Modern CSS can also mix colors directly with color-mix(in oklab, …), which produces smoother results than mixing in sRGB.