Welcome to Code Palette 🎨

This site is for devs and designers alike. It helps you design color themes for technical documentation while scrolling a dedicated blog on the topic. Choose a preset or customize your own palette using the controls on the right. And enjoy reading!

Never design without content

A wise designer once told me: "Don't design too much without the actual content."

Why? Because before you have content your design is fragile and purely a set of (hopefully good) ideas. Because content is both imperfect (real text is never perfectly lengthened like your lorem ipsum) and sometimes unpredictable (Surprise: this image placeholder turns out to be a closeup of a carrot! Orange just entered your palette-party without an invitation and now you need a new table plan).

Content pulls your design from fantasyland down into realityland.

This philosophy inspired me to add this micro blog on this website. Its filled with content you can borrow while playing with colors and fonts.

Let's give you some fun code to work with: Radix-2 Cooley–Tukey FFT algorithm implemented in JavaScript:


// Minimal Complex class
class Complex {
  constructor(re, im) { this.re = re; this.im = im; }
  add(o) { return new Complex(this.re + o.re, this.im + o.im); }
  sub(o) { return new Complex(this.re - o.re, this.im - o.im); }
  mul(o) {
    return new Complex(
      this.re * o.re - this.im * o.im,
      this.re * o.im + this.im * o.re
    );
  }
}

// Radix-2 Cooley–Tukey FFT in JavaScript
function fft(arr) {
  const N = arr.length;
  if (N <= 1) return arr;

  const even = fft(arr.filter((_, i) => i % 2 === 0));
  const odd  = fft(arr.filter((_, i) => i % 2 !== 0));

  const out = Array(N);
  for (let k = 0; k < N / 2; k++) {
    const angle = (-2 * Math.PI * k) / N;
    const twiddle = new Complex(Math.cos(angle), Math.sin(angle)).mul(odd[k]);
    out[k] = even[k].add(twiddle);
    out[k + N / 2] = even[k].sub(twiddle);
  }
  return out;
}

    

Now you might be thinking: "Why would I implement the FFT in JS when I could do it in Rust/C/Zig, compile it to WASM, and just execute that in my JS runtime. Would that not be faster???"

Perhaps. But thats not the question you should ask! Instead you should ask: "How can I get real content for my design project..?" - Until you solve that issue you can borrow this micro blog and still progress in your colors/fonts :)