Skip to content
Color & Shaders

Shader Palette Generator

Design cosine-based color palettes for GLSL shaders. Drag the twelve parameters, watch four live shaders react, then copy the palette function straight into your code.

Palettea + b·cos(2π(c·t + d))
Parameters
Red
a
b
c
d
Green
a
b
c
d
Blue
a
b
c
d
Examples
VHS
Wobble
Hexagons
Chaos
palette.glsl
// https://tools.earthling.dev/palette?p=0.5,0.5,0.5,0.5,0.5,0.5,1,1,1,0,0.33,0.67
vec3 palette(float t){
  vec3 a=vec3(0.5,0.5,0.5);
  vec3 b=vec3(0.5,0.5,0.5);
  vec3 c=vec3(1,1,1);
  vec3 d=vec3(0,0.33,0.67);
  return a+b*cos(6.28318*(c*t+d));
}
Saved palettes

Saved palettes are kept in this browser only. Save one to come back to it later.

Related tools

Free and open source from Earthling Digital, an independent creative agency. Built with Earthling UI.