code-anything.com
Sign inStart free

Colour palettes.

22 contrast-checked colour systems — 11 light and 11 dark, in 5 moods. Each one is a set of roles the whole platform understands, not a swatch board.

What a palette is

Most palettes online are five squares and a hex code. The last mile — which colour is the button, the card, the small grey text — is where they fall apart.

A palette here is defined by what each colour does. Every palette sets the same seven roles, so the colours are portable: the design system, the templates, the elements library and the code the agent writes all read the same tokens. Swapping palettes repaints a product instead of breaking it.

Palettes are chosen as sets, not as individual colours. A text colour is only good against a background, an accent only good next to the surface it sits on. Contrast-checking here means each palette is reviewed as a whole: body copy stays legible, muted copy stays secondary, and the accent stays loud enough to act like a button.

The seven roles

One vocabulary, shared by every palette, template and generated app — and the same names the editor copies to your clipboard.

RoleTokenWhat it does
Background--bgThe page canvas — the biggest area on screen, and the colour every other role is judged against.
Surface--surfaceCards, panels, nav bars and modals. One quiet step off the background so grouped content reads as a layer.
Text--textHeadings and body copy. The highest-contrast colour in the set.
Muted--mutedSecondary copy, captions, metadata and placeholders — present, never competing with the text.
Accent--accentThe brand colour: primary buttons, links, active states and highlights.
Accent 2--accent2The supporting accent for gradients, secondary buttons, badges, charts and illustration.
Border--borderHairlines, dividers and input outlines. Separates regions without drawing a hard box around everything.

The two pairs worth understanding

Accent and accent 2. Accent is your brand: the primary button, the active nav item and the links, and almost nowhere else. Accent 2 is the release valve — the second colour in a gradient, the badge on a card, the second series in a chart — so a design has range without looking like it has two logos.

Background and surface. Keeping them close gives a calm, flat, editorial page; pushing them apart makes cards and panels pop and suits dense product UI. Border then does the fine separation neither of them should be asked to do.

How a palette reaches the code

Picking a colour is not a preview trick. It reaches the generated app.

  1. Colours are roles, not hex codes. Nothing in a generated design references a raw hex. Every fill, border and text colour is bound to a role token, so swapping the palette restyles every token-bound value at once — layout, spacing and content untouched.
  2. The preview recolours live. Switch palettes in the Studio preview and the whole document restyles immediately. A switch — or a single token edit — is one undoable step, so trying five palettes costs nothing.
  3. The build inherits your choice. The palette is saved with the project and carried into the build instruction, so the app is generated in those colours from the first file rather than repainted afterwards.
  4. Templates and elements follow. Every template ships its own palette, and the elements library re-themes to whichever palette you have selected — so a button you drop in matches the page it lands on.

Editing a palette

Every palette page opens an editor. Nothing in the library is read-only.

  1. Click any swatch to open your system colour picker, or type a hex value into the field.
  2. The live preview beside the swatches re-renders as you go — nav, hero, buttons, cards and muted copy — so you judge the colour in context.
  3. Copy CSS variables puts a plain :root block of custom properties on your clipboard.
  4. Reset returns the palette to the published version, so experimenting is never destructive.
  5. Build with this palette hands the exact colours to the agent and starts a project in them.
what “Copy CSS variables” gives you — Aurora
:root {
  --bg: #ffffff;
  --surface: #f6f8fc;
  --text: #0d1426;
  --muted: #5d6675;
  --accent: #5a63f0;
  --accent2: #8b5cf6;
  --border: #e6e9f1;
}

Seven custom properties, no framework, no build step. Map them onto your own components and the palette works anywhere. Open Aurora in the editor ›

Choosing a palette

Start from the job the site has to do, not from the colour you personally like most. Three questions settle most decisions.

  • How much of the screen is content you did not design? The more photography, video or user posts, the more neutral the background and surface should be.
  • How long is a session? Something people live in all day argues for a low-drama palette and one loud accent; a ninety-second visit can afford to be striking.
  • What already exists? If you have a logo or brand colour, treat it as the accent and pick the palette whose neutrals flatter it.

None of this is a cage. Open the closest palette, set the accent to your brand colour and keep the rest — or describe the look in chat and let the agent build the design system with you.

Browse the palettes ›

Light mode, dark mode

The library is deliberately even: 11 light palettes and 11 dark ones, each authored for its own mode.

ModeHow it separatesSuits
Light (11)Dark text on a pale ground. Separation comes from small surface shifts and hairline borders, so the border role matters most. Ocean, Sage, Arctic and Boutique are the quietest; Citrus and Blossom carry the most colour.Marketing sites, documentation, commerce, anything printed or screenshotted often.
Dark (11)Pale text on a deep ground, where one luminous accent carries enormous weight — Midnight’s cyan, Neon’s magenta, Forest’s gold. Less forgiving of low-contrast greys, so muted does careful work.Dashboards, developer tools, media, anything with a cinematic mood.

A dark palette is not its light counterpart inverted — inverting usually produces muddy greys and accents that glare. If your product needs both, choose a light and a dark palette from a related accent family (Ocean and Lagoon are both teal-green; Boutique and Mono are both monochrome) and ask in chat for them to be wired to a theme toggle. Because colours are roles, a second theme is a second set of token values, not a second stylesheet.

Colour accessibility basics

Six rules that prevent most colour problems, whichever palette you land on.

  1. Body text wants strong separation from the background — the widely used floor is a 4.5:1 contrast ratio, and 3:1 for large or bold headings.
  2. Interface furniture counts too: icons, input outlines and focus rings are usually held to 3:1 against what sits behind them.
  3. Never let colour be the only signal. Pair it with a label, an icon or a shape so the meaning survives colour-blindness and greyscale printing.
  4. Accents are for emphasis, not paragraphs. A vivid accent that looks superb on a button is often unreadable as running text.
  5. Test the pairings you actually ship — text on surface, muted on surface, accent on background — not just text on the page background.
  6. Re-check after you edit. A customised palette is your responsibility, not the library default.

Contrast ratios are a floor, not a target: two colours can clear the threshold and still be tiring to read for an hour. That is why muted is a first-class role — the most common accessibility failure in real products is secondary copy lightened until it disappears. Accessibility is a property of the finished page, not of a set of hex codes, so verify the combinations you ship.

Palette questions, answered

What is a colour palette on code-anything?

A named set of seven colour roles — background, surface, text, muted, accent, accent 2 and border — that together define a complete design system rather than a mood board. Because the roles are fixed, any palette can be applied to any design: the app knows that "accent" means buttons and links, so it can repaint an entire product without you touching a single component.

How do light and dark palettes differ?

Each palette is authored in one mode. Light palettes put dark text on a pale background and use borders and subtle surface shifts to separate regions; dark palettes invert that and lean on luminous accents, because a bright colour reads far stronger against a dark ground. The mode is recorded on every palette and drives readable defaults in the previews.

What happens to my app when I pick a palette?

The palette is saved with your project and passed into the build instruction, so the generated app is built in those colours. In the Studio preview, switching palettes restyles every token-bound colour live as a single undoable step — nothing about the layout or the content changes.

What is the difference between a palette and a template?

A palette is colour only. A template is a whole design system — palette, typography, radius and component rules — with starter code for a specific kind of site. Start from a template when you want the structure decided for you, and from a palette when you already know the shape of your product and only need the colour direction.

Are the palettes accessible?

They are curated and contrast-checked: each one pairs its text and muted colours against its own background so body copy stays legible, and accents are chosen to work as buttons and links rather than as paragraph text. That is a design review, not a certificate — the accessibility of the page you ship also depends on font size, weight and how you combine the roles, so verify the specific pairings in your build, especially if you have edited the colours.

Can I change the colours in a palette?

Yes. Open any palette and the editor lets you click a swatch to open a colour picker or type a hex value directly. The live preview updates as you edit, Copy CSS variables gives you the whole set as a :root block, and Reset restores the published version.

Can I use these palettes outside code-anything?

The editor exists partly for that. Copy CSS variables produces a plain block of CSS custom properties with no dependency on this platform, so you can paste it into any stylesheet, design tool or codebase and map the same seven roles onto your own components.

Start your first build.

Describe an app or connect a repo — free to try, with nothing to configure.