Game Dev Cheat Sheet

Game Colour Palette Generator

Generate harmonious colour palettes for games with colourblind simulation, contrast checking, and engine code export.

Choosing colours for a game involves more than aesthetics. Your palette needs to work for colourblind players (affecting up to 8% of male players), maintain readable contrast ratios, and keep characters visible against varied backgrounds. This tool generates harmonious palettes and tests them against real accessibility constraints.

Presets

Base Colour

#E63946
#39E6D9
Harmony:
Vision:

Palette

Crimsonrgb(230, 57, 70)hsl(355, 78%, 56%)
Turquoisergb(57, 230, 217)hsl(175, 78%, 56%)

Contrast Matrix

WCAG contrast ratios for every colour pair in your palette.

FG \ BG
—
2.7
2.7
—
Green: AA pass (4.5:1+)Yellow: large text only (3:1+)Red: fail (<3:1)

Sprite Readability

Each palette colour shown as a character silhouette against common game backgrounds.

ColourGrassSkyStoneCave
#E63946
#39E6D9

Export

new Color[] { new Color(0.902f, 0.224f, 0.275f), new Color(0.224f, 0.902f, 0.851f) }

Frequently asked questions

What is the most common form of colourblindness?
Red-green deficiency is by far the most common. Deuteranomaly (reduced green sensitivity) alone affects roughly 5 percent of men, and full deuteranopia about 1 percent; under 1 percent of women are affected. Protan types are similar but rarer. Tritan (blue-yellow) types are rarer still. Designing primarily against deuteranopia covers the largest portion of affected players.
What contrast ratio do I need for game UI text?
Aim for WCAG AA: 4.5:1 for body text and 3:1 for large or bold text. For HUD text overlaid on gameplay, push higher (7:1 if possible) and add a subtle stroke or backdrop, since the underlying scene changes constantly.
How many colours should be in a game palette?
For pixel art and stylised games, 5 to 16 colours give a unified look. For full 3D, you typically work with a primary, secondary, accent, and a neutral plus their tonal variations: roughly 8 to 12 anchor colours that everything else derives from.
Should game colours be the same in sRGB and linear space in Unity?
Pick colours in sRGB. Unity treats Color values from the Inspector and from C# as sRGB and converts them when it passes them to colour properties, so a colour looks the same in Gamma and Linear projects. Use Project Settings > Player > Color Space to choose Linear for PBR-style rendering. Only values you send to a shader as plain floats or vectors need converting yourself, using color.linear or Mathf.GammaToLinearSpace.

Last updated: