How to Build a Website Using Related Colors | Tips to Avoid a Monotonous Palette
Related colors can give a website a cohesive look without requiring a large palette. But if the background, text, and buttons all use colors with nearly the same lightness, the page may appear monotonous and important information can disappear into its surroundings. This article uses a combination of blue and slightly greener blue tones to show how related colors can have distinct jobs. A HEX code is a hexadecimal way of specifying colors on the web.
Combine similar hues with clearly different levels of lightness
Here, related colors means colors with nearby hues, such as blue and blue-green. Hue describes the type of color; using related hues can include subtle shifts toward green as well as lighter and darker variations of a single blue. Simply adding more nearby hues does not make the page easier to navigate if their lightness—how light or dark they are—remains much the same.
Start by assigning pale colors to broad reading backgrounds, dark colors to important headings and text, and a clearly distinguishable deeper color to the main action. For example, a deep blue #1C506B introductory section followed by a nearly white #F7FAFB reading area creates a clear change in purpose while maintaining a related-color palette.
Color should not carry the whole information hierarchy. Heading size, spacing, and card borders can also separate information. Concentrate the deeper hues in key sections, and when two pale related backgrounds sit next to each other, do not expect the subtle difference in color to identify the section boundary by itself.
Example palette for a planetarium event booking page
Imagine a site showing photographs of a star-filled sky alongside showtimes, recommended ages, ticket prices, and seat reservations. The palette centers on nearby blue and blue-green hues, with distinct surfaces for photography and the details people need before booking.
- Opening announcement: Use deep blue #1C506B as the background with white #FFFFFF event headings and a short description. Text-to-background contrast is approximately 8.72:1. Keep text on a solid surface rather than directly over a photograph whose brightness changes across the image.
- “See show details” button in the introduction: Choose pale blue-green #C9E7EA with dark slate #273741 lettering. The text-to-button ratio is about 9.42:1, and the button surface contrasts approximately 6.68:1 with the surrounding deep blue #1C506B.
- Showtimes and ticket information: Use near-white #F7FAFB with slate #273741 body text. Their contrast ratio is about 11.72:1. Moving the longer explanations onto this lighter area also separates them from the atmospheric opening section.
- Program cards: Place slate #273741 titles and descriptions on white #FFFFFF cards for a ratio of about 12.29:1. But white #FFFFFF cards differ from the near-white page background #F7FAFB by only about 1.05:1. Use borders and spacing so each program remains identifiable.
- Meeting-time and visitor-information panel: Use pale blue-green #DDEFF0 with slate #273741 text. The text contrast ratio is about 10.34:1. The panel differs from the surrounding near-white #F7FAFB by just 1.13:1, so add a clear heading and suitable separation.
- Card and input outlines: A muted blue-gray #6D8490 border contrasts by approximately 3.92:1 with white #FFFFFF and 3.30:1 with the pale blue-green panel #DDEFF0. Use it where an input field needs a clearly identifiable boundary.
- “Reserve seats” button in the details area: Put white #FFFFFF lettering on deep blue-green #175A6C. Text-to-button contrast is about 7.73:1, while the button differs from the surrounding near-white #F7FAFB by approximately 7.37:1.
- Secondary decoration: A medium blue-green #3D8590 has a contrast ratio of about 4.24:1 against white #FFFFFF. It can be used for decorative lines, but that is below the 4.5:1 threshold for normal-size text, so do not reuse it for essential small lettering.
Deep blue and blue-green are closely related in hue, so the design can feel coherent without introducing a strong opposite color. The difference comes from the roles of light surfaces, text, and booking controls, not from adding many unrelated colors.
Prevent monotony by checking boundaries and interactive states
Alternating similar backgrounds alone may not provide enough variation. White #FFFFFF program cards, near-white #F7FAFB page sections, and pale blue-green #DDEFF0 information panels differ only slightly in lightness. Give them structure with headings, spacing, and borders instead of introducing extra decorative colors.
Under WCAG 2.2 (Web Content Accessibility Guidelines) Level AA, normal-size text requires at least 4.5:1 contrast against its background, and large text at least 3:1. Essential non-text indicators needed to identify controls and their states, such as a required input border, generally need at least 3:1 against adjacent colors. Clearly label conditions such as “Fully booked” and “Booking open”; differences between two blue shades are not enough on their own.
Check the mobile layout for small showtime labels, boundaries around photographs and information panels, and the location of the reservation button. HueRoll can check a selected color against white and black, but it does not directly compare arbitrary pairs of colors or automatically determine WCAG AA or AAA conformance. The custom-pair ratios in this example were calculated separately and should be checked in the finished design.