TR

Home / Guides / How to Choose a Color Palette for a Website: Building a Full Palette From One Color

How to Choose a Color Palette for a Website: Building a Full Palette From One Color

Updated: November 6, 2026 · AracMerkezi

▶ Open Color Palette Generator

A well-chosen color palette makes a site look professional and makes a brand memorable. Instead of using many colors, repeating a small number of colors consistently often gives better results. In this guide we build the method step by step from a single brand color, with numbers and CSS examples: choosing color is first a calculation and only then a matter of taste.

How many colors should a palette have?

A practical palette is divided into these roles:

For most sites, one primary, one accent, three or four neutrals and three status colors are enough; around twelve values in total can cover every screen.

The 60-30-10 rule

Balance is achieved when about 60% of the area is the dominant color (usually a neutral), 30% the secondary color and 10% the accent color. This is not a strict rule, just a practical starting guide. For example, on a landing page with 10 sections, 6 sections sit on a light neutral background, 3 on a dark primary background, and the accent appears only on buttons and a few icons.

Types of color harmony

Example 1: Generating harmonies from a single HEX color

Let's pick #0B7A6B as the primary. Its HSL equivalent is roughly hue 172°, saturation 83%, lightness 26%. The harmony types are found by changing only the hue (the degree); if saturation and lightness stay the same, the colors look equally "heavy":

HarmonyHueResult (S 83%, L 26%)
Primary172°#0B796B (rounding difference from #0B7A6B)
Complementary172 + 180 = 352°#790B1A
Analogous142° and 202°#0B7934 and #0B5179
Triadic292° and 52°#6B0B79 and #796B0B

Note: 172 + 120 = 292 and 172 + 240 = 412, so subtracting 360 gives 52; the hue wheel wraps between 0 and 360. Instead of doing this by hand, you can generate the values with the Color Palette Generator and copy the HEX codes.

Example 2: A tint scale from the same hue

Keeping hue and saturation and changing only lightness produces light backgrounds and dark heading colors. The contrast ratios of the values below against a white background have been calculated:

LightnessHEXContrast on white
94%#E3FCF91.07:1
45%#14D2B91.92:1
34%#0F9F8B3.31:1
26%#0B796B5.30:1
16%#074B4210.03:1

For normal-size text, the WCAG AA level requires at least 4.5:1. According to the table, 34% lightness is still insufficient; only 26% and below is safe as a text or button background. A tone that looks nice can be unreadable; see the contrast guide for details.

Example 3: Neutrals and CSS variables

Pulling the primary's hue into the neutrals at very low saturation makes the palette feel unified. With the same 172° hue at 10% saturation you get a light background #F4F6F6, dark text #1C2221 and secondary text #5C706D. Contrasts: dark text on the light background is 14.89:1, secondary text 4.85:1 and a primary-colored link 4.83:1; all three clear the 4.5:1 threshold. For an accent, if we take the complementary hue in a more vivid form, #AD1F32 (hue 352°, S 70%, L 40%) gives 6.96:1 with white text.

Define these values once as CSS variables: --primary: #0B7A6B; --accent: #AD1F32; --bg: #F4F6F6; --text: #1C2221;. Then use them everywhere as color: var(--text) and background: var(--primary). If the color changes, you only update one line.

HEX, RGB and HSL

Colors can be written in different formats: #0B7A6B (HEX), rgb(11, 122, 107) (RGB), hsl(172, 83%, 26%) (HSL). HSL is the most useful for producing light and dark shades because it shows hue, saturation and lightness separately. You can convert between formats with the Color Code Converter; there is also a HEX-RGB guide.

Common mistakes

A palette for dark mode

In dark mode the same primary often does not work. #0B7A6B gives only 3.08:1 on the dark background #1C2221, below the 4.5:1 threshold. The same hue at 34% lightness, #0F9F8B, gives 4.89:1, and at 45% lightness, #14D2B9, gives 8.42:1. So in dark mode you need to shift the primary to a lighter tone for links and buttons, which is why defining variables separately per theme is a good habit.

When to break the rules

60-30-10 and harmony wheels are starting points. If a brand color already exists, you build the palette around it; on a photo-heavy site the color can come from the photographs. Cultural associations and accessibility (color blindness) must not be ignored.

Step by step

  1. Choose your brand's primary color and note its HSL value.
  2. Generate complementary, analogous or tint palettes with the Color Palette Generator.
  3. Test text and background pairs with the Color Contrast Checker.
  4. Define the colors as CSS variables and use the same variable everywhere.
  5. If you want a gradient background, see the CSS Gradient Generator.

Frequently asked questions

What is the 60-30-10 rule?

About 60% of the area is filled with the dominant color (usually neutral), 30% with the secondary and 10% with the accent. It is a starting guide for balance, not a strict rule.

How do I find a complementary color?

It is the color opposite on the wheel (180 degrees). In HSL, add 180 to the hue and subtract 360 if it exceeds 360; for 172° you get 352°.

What contrast ratio should a text color have?

The WCAG AA level asks for at least 4.5:1 for normal-size text. For example, #0B7A6B against white is about 5.2:1.

Tools mentioned in this guide

More guides

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.