Analogous color generator
Give a base color and an angle and get its two hue neighbors: #3366cc with 30 degrees returns #33b2cc and #4c33cc, with the same saturation and lightness, a calm three-color family for interfaces and brands. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Color
- #3366cc
- Angle
- 30
- Palette
- #33b2cc, #3366cc, #4c33cc
Analogous colors sit next to each other on the hue circle, so they share a family of undertones and feel naturally harmonious in interfaces, branding systems, and illustration. This generator takes a base CSS hex color and a positive hue-shift angle in degrees, converts the base to HSL, then builds the two neighbors by subtracting and adding that angle while holding saturation and lightness fixed. The result is a three-swatch palette—minus, base, and plus—returned as hex, RGB integers, HSL components, and a ready-to-use palette array. Classic design practice uses thirty degrees for a tight family and larger steps when you want more separation without jumping to complementary contrast. Invalid hex codes and out-of-range angles fail with a clear validation error instead of inventing a palette.
How analogous hue shifts work
Start with a base color written as a CSS hex string such as hash three three six six c c or the short form hash three six c. The solver expands three-digit hex, parses red green and blue channels in the zero-to-two-hundred-fifty-five range, and converts that RGB triple into HSL using the standard CSS and W3C formulas so hue lives in degrees on a zero-to-three-hundred-sixty circle while saturation and lightness are percentages.
The angle parameter is a positive number of degrees strictly greater than zero and at most one hundred eighty. The two analogous neighbors are formed by moving the hue to base hue minus angle and base hue plus angle, wrapping through zero when the walk crosses the red edge of the wheel, and leaving saturation and lightness untouched so the family stays in the same chroma and value band.
Each resulting HSL triple is converted back to integer RGB with the same hue-two-rgb path used by browser color modules, then formatted as lowercase hex, an rgb parentheses string, and an hsl parentheses string.
What you send and what you get back
Send a required color field as a hex string and a required angle field as a finite number of degrees. Valid color forms are three or six hexadecimal digits with an optional leading hash; case is ignored and the output always normalizes to a six-digit lowercase hash. Angle must be greater than zero and at most one hundred eighty so the two neighbors remain distinct and do not collapse into a complementary-style one-hundred-eighty flip that would be a different harmony intent.
Typical checks include a mid blue hash three three six six c c with a thirty degree angle for a classic cool family, pure red hash f f zero zero zero zero with thirty degrees for warm orange and magenta neighbors, and a short three-digit hex to confirm expansion.
Where analogous palettes show up in real work
Product designers build component states, chart series, and marketing hero gradients that need related hues without the high tension of complementary pairs; a fixed angle keeps tokens reproducible across design systems. Brand teams derive secondary and tertiary brand colors from a primary hex when a style guide only ships one official swatch and still wants a controlled family for illustration and social templates.
Frontend engineers generate CSS custom properties and Tailwind-style token maps from a single seed color so light and dark themes stay on the same hue spine while only lightness changes elsewhere. Data visualization authors assign series colors that remain distinguishable yet cohesive for categorical charts where complementary clashes would imply opposition rather than grouping. Curriculum and workshop facilitators teach color theory with live examples: students enter a favorite hex, try thirty versus forty-five versus sixty degrees, and immediately see how far the family walks around the wheel.
If you later need complementary or triadic schemes, HSL to RGB conversion alone, nearest CSS named color lookup, or WCAG contrast checks, treat those as separate search intents and landings rather than overloading this analogous generator page.
What you can do with it
Brand secondary and tertiary tokens
Derive two neighboring brand hues from a primary hex and a fixed angle so style guides and design systems stay consistent across marketing and product UI.
UI theme and chart series palettes
Generate cohesive CSS variables or chart series colors from one seed without the high-contrast tension of complementary pairs.
Color theory drills and workshops
Let students enter a hex and try 30°, 45°, and 60° shifts to see how analogous families walk the wheel with saturation and lightness held fixed.
FAQ
What is an analogous color palette?
An analogous palette is three (or more) colors that sit next to each other on the hue wheel. This tool builds exactly two neighbors of your base by shifting hue ±angle while keeping saturation and lightness fixed.
What angle should I use?
Thirty degrees is the classic tight family used in many design systems. Larger values such as 45 or 60 open more separation; the accepted range is greater than 0 and at most 180 degrees.
Which color formats are accepted?
CSS hex only: #rgb or #rrggbb, with or without the leading hash.
Does the generator change saturation or lightness?
No. Only hue moves by ±angle. Saturation and lightness of the base are preserved on both neighbors so the family stays in the same chroma and value band.
What does it cost?
The browser tool is free and runs locally.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/color/analogous \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"color":"#3366cc","angle":30}'const res = await fetch("https://api.kit.forhosting.com/color/analogous", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"color": "#3366cc",
"angle": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/color/analogous",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"color": "#3366cc",
"angle": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/color/analogous", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"color":"#3366cc","angle":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"color":"#3366cc","angle":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/color/analogous", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"color": "#3366cc",
"angle": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "color.analogous",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
How analogous hue shifts work
The response also echoes the cleaned base color, the numeric angle, named swatches for base, analogous_minus, and analogous_plus, a three-element palette array ordered from cooler-minus through base to warmer-plus relative to the shift direction, and a compact formula field for docs and debugging. The pipeline is pure deterministic floating-point arithmetic: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON. Alpha hex forms, non-hex characters, missing color, missing angle, NaN, Infinity, zero angle, and angles above one hundred eighty are rejected with invalid_input.
What you send and what you get back
The color field also accepts the aliases hex and base so existing theme JSON that stores hex or base keys can call the same contract without a rename step. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where analogous palettes show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.