Obsession with Gradation


https://editor.p5js.org/imrinahru/sketches/RKRglgP5p

gradation1.png

gradation2.png

eg. for the sunset color palette, the first strip: Use t = 0:

  • r = 0.6 + 0.4*cos(2π*(1*0 + 0.00)) = 0.6 + 0.4*1 = 1.0
  • g = 0.3 + 0.3*cos(2π*(0.10)) ≈ 0.3 + 0.3*0.809 = 0.543
  • b = 0.2 + 0.2*cos(2π*(0.20)) ≈ 0.2 + 0.2*0.309 = 0.262

Convert to 0..255:

  • R ≈ 255, G ≈ 138, B ≈ 67 (warm orange). Then following strips change color depending on t

Intuitively,

  • Increase d differences between R/G/B → stronger hue changes.
  • Lower b values → softer/pastel colors.
  • Raise a values → brighter palette.
  • Raise c values (like 2) → more color cycles across the canvas.