ColorSense Blog
How to Create a Color Palette From One HEX Code
Turn one HEX code into a useful color palette. Explore harmony options, add neutrals, assign roles, and verify the exact text and background pairs.
To create a color palette from one HEX code, use that value as your anchor, explore a color-harmony relationship, add useful light and dark neutrals, and assign each result a role. Then test the exact text and background combinations. Generating related colors is the starting point; deciding how they will work in your design is the part that makes the palette usable.
A single code is enough to begin. It may come from a logo, a product photo, an existing website, or a color you already know you want to use. You do not need to invent the rest of the palette randomly, and you do not need to keep every color a generator suggests.
What a HEX code tells you, and what it does not
A six-digit HEX color such as #2563EB specifies red, green, and blue channel values for a digital color. The leading hash is followed by three two-digit hexadecimal pairs. Copy all six digits when moving the color between tools so the value remains precise.
The code does not describe a color's job. The same blue might be an action-button background, a decorative illustration color, or a link foreground. Each use creates a different relationship with the rest of the design. Decide which role your starting code should hold before judging the generated results.
Also keep the output context in mind. These examples use digital sRGB values. Screen brightness, surrounding colors, and display settings affect perception. A screen HEX value is not a guaranteed paint, ink, or print match; physical production needs its own specifications and proofs.
Enter the starting value in ColorSense
Open the Color Scheme Generator, which leads into the shared ColorSense Lab workspace. In the Schemes tool, enter your six-digit value in the HEX input. The color wheel helps you see and explore the anchor, but the typed value is the precise starting point.
For this example, start with #2563EB. If your code came from a logo or image, the Color Picker from Image can help identify candidate colors first. Be careful with compressed images, photographs, and blended edges: a sampled pixel is not automatically the original brand specification.
Keep a copy of your original code before experimenting. That gives you a clear reference when you compare variants. If the brand already has an approved primary color, distinguish between changing that primary and exploring supporting colors around it.
Choose a harmony relationship for the job
Harmony modes organize hues around the anchor. They create candidates based on color-wheel relationships, not a guarantee of readability or a recommendation for a particular industry. Compare the modes in the context of the design you are building.
Analogous: explore nearby hues
An analogous scheme uses neighboring hues. It can be useful when you want variation without introducing a strong opposite-hue contrast. However, nearby colors with similar lightness may become hard to distinguish when used as adjacent states or small chart categories.
Give the candidates different jobs and inspect their lightness as well as their hue. An analogous set may need a separate dark text color and a light background. You can retain a restrained mood without asking closely related swatches to carry every functional distinction.
Complementary: explore an opposing hue
A complementary scheme places a hue opposite the anchor. It offers a direction for a contrasting accent, but the accent need not have the same visual weight as the primary. Using both colors across large surfaces can feel quite different from using one for a small highlight.
Do not treat opposite hues as a WCAG pass. Hue distance is not a contrast ratio. A blue and an orange may look strongly different while still producing insufficient text contrast. Measure the actual foreground and background if they will be placed together.
Triadic and split-complementary: explore more variety
Triadic schemes use three spaced hues. Split-complementary schemes use two hues neighboring the anchor's opposite. Both give you more candidates, which can help when a project needs separate visual themes or illustrations.
More variety also creates more decisions. Keep one anchor dominant and explain the purpose of the other colors. If a generated hue has no useful job in the current project, exclude it rather than preserving the whole scheme for its own sake.
Add neutrals before calling the palette finished
A harmony result often concentrates on expressive hues. A usable interface, presentation, or document also needs surfaces and legible text. Add a light neutral and a dark neutral when the generated set does not already cover those jobs.
For our illustrative blue palette, consider off-white #F8FAFC as a surface and dark navy #0F172A as text. These are deliberate role choices, not claimed output from a specific harmony mode. Amber #FBBF24 can be an optional accent, while slate #475569 can provide supporting variation.
| Role | Candidate | Initial use |
| Anchor | #2563EB | Primary action or branded emphasis |
| Supporting | #475569 | Secondary design elements, with pair-specific checks |
| Accent | #FBBF24 | Limited highlights with a verified foreground |
| Background | #F8FAFC | Main light surface |
| Text | #0F172A | Copy on approved light backgrounds |
You can stop at two or three colors if those cover the work. An anchor, a light surface, and a dark foreground can be enough for a simple template. Five roles are a useful checklist, not a requirement to generate five unrelated hues.
Verify the combinations, not the swatch collection
Use the WCAG Contrast Checker for the pairs that will actually appear. WCAG 2.2 Level AA requires at least 4.5:1 for normal text and 3:1 for large text. Large text means at least 18 points, or 14 points bold.
White #FFFFFF on our anchor blue #2563EB has a calculated contrast ratio of 5.17:1. It passes AA normal text but does not reach the 7:1 AAA normal-text threshold. Navy #0F172A on off-white #F8FAFC is 17.06:1 and passes AAA normal text.
Those examples do not approve the rest of the palette automatically. White #FFFFFF on amber #FBBF24 is only 1.67:1 and fails AA normal and large text. Navy #0F172A on that amber is 10.69:1 and passes AAA normal text. The accent can remain useful if you give it the right foreground.
The ratios are calculated from the stated sRGB values and rounded for display. Evaluate thresholds with the unrounded result. Then inspect type size, weight, and rendering in the actual layout. A palette generator cannot determine every condition your finished design will contain.
Use the ColorSense Anchor-to-Roles workflow
The ColorSense Anchor-to-Roles workflow keeps the process manageable: preserve the starting code, explore a harmony, assign roles, and verify the pairs. It is an editing sequence, not an automated accessibility certification.
- Preserve: record the original six-digit code and its intended role.
- Explore: compare a small number of harmony options without committing to every result.
- Assign: name the anchor, support, accent, surface, and foreground your project actually needs.
- Verify: check each real foreground/background pairing and inspect a realistic layout.
- Document: save approved values, uses, and restrictions so the next design starts from the same decisions.
Once you choose a scheme in the Lab, apply the generated colors to the shared palette, then refine the working set. Review it with Palette Health and test a layout rather than judging only the wheel or the swatches.
For more detail on assigning jobs, see the five-role palette workflow. That guide covers how to decide whether a candidate deserves a place in the set and how a small collection can cover several roles.
Common mistakes when starting from one color
Keeping every generated result. A harmony mode can suggest colors you do not need. Remove candidates that repeat a role or make the layout harder to apply. A shorter palette with clear instructions is often easier to reuse.
Forcing the anchor to become body text. A primary brand color may be too light on your chosen surface. Keep it for backgrounds or emphasis, then introduce a verified foreground or darker companion for readable copy.
Skipping neutrals. Several expressive hues can look convincing together and still leave you without an appropriate text or background color. Solve the content surface before polishing secondary swatches.
Changing the original code accidentally. Wheel exploration and manual edits can move you away from an approved value. Keep the original reference and be explicit about whether the result is a new primary or a supporting variant.
Save the rules, not just the codes
In your Brand Kit, record the starting value and the final colors with their intended roles. Include approved text/background pairs and restrictions such as dark text on amber, never white. This makes the result useful to someone who was not present during generation.
When you need an alternative design later, return to the same anchor and brief. Change only the relationships the new context requires, then repeat the checks. One precise starting code can support many layouts, provided the palette is treated as a set of decisions rather than a universal swatch recipe.
Try it now
Check any color pair against WCAG : free, no signup
Pick a foreground and background, see the exact contrast ratio plus AA/AAA verdicts for normal and large text. One click auto-fixes a failing pair while keeping your hue.
Open WCAG Contrast Checker →
Frequently asked questions
Can I create a palette from a single HEX code?
Yes. Use the code as an anchor, explore harmony relationships, add useful neutrals, assign roles, and verify your actual text and background pairs.
Which harmony mode should I use first?
Try analogous for nearby-hue variation or complementary for an opposing accent. Compare the result against your brief. Neither mode guarantees readability or suitability for a particular brand.
Does a generated palette automatically meet WCAG?
No. A harmony generator organizes color relationships. WCAG text contrast is measured between specific foreground and background colors, and the finished design needs additional accessibility checks.
Can I keep my original brand HEX value unchanged?
Yes. Preserve it as the approved anchor and edit the supporting colors around it. If it fails for a functional use, introduce a documented companion instead of silently replacing the original.
How many colors do I need around the starting code?
Only as many as the project requires. An anchor, light surface, and dark text can be enough for a simple layout. Add supporting and accent colors when they have a specific role.