Generate SVG
Base color plus palette name
Used in the SVG aria-label
Preview
Rendered live from the base color
SVG source
Copy or download the .svg file

Why export a palette as SVG?

  • Scales cleanly to any size — retina, print or 8K display.
  • Small file size — a full palette is typically under 2 KB.
  • Renders in GitHub README files, Markdown docs and printed PDFs.
  • Editable — the output is plain text and uses standard <rect> and <text> elements.

Embedding the SVG

In a README (external file)

![Palette](./assets/palette.svg)

Inline in HTML

<div class="palette-preview">
  <svg role="img" aria-label="Primary color scale" viewBox="0 0 1100 60">
    <rect x="0" y="0" width="100" height="60" fill="#eef2ff" />
    <rect x="100" y="0" width="100" height="60" fill="#e0e7ff" />
    <!-- … -->
  </svg>
</div>

As a data URI

background-image: url("data:image/svg+xml;utf8,<svg ...></svg>");

Editing the SVG

The exported SVG uses a simple structure that is easy to modify:

  • Each color is a <rect> with a fill attribute.
  • Labels are <text> elements you can restyle.
  • Change the viewBox to control aspect ratio.

Frequently asked questions

Does GitHub render SVG in READMEs?

Yes. GitHub renders SVG images referenced by relative path or by URL. SVG files must not contain scripts, and external references are blocked, but the output of this generator is fully self-contained.

Can I use the SVG in emails?

Most desktop email clients do not render SVG. If your audience reads emails on desktop, convert the SVG to PNG first. Mobile clients vary; SVG works in some but not all.

Is the SVG accessible?

The generator includes role="img" and an aria-label naming the palette. For strict accessibility, add a <title> element inside the SVG, or provide adjacent text with the hex values.

Can I edit the SVG in Figma or Illustrator?

Yes. Both tools import SVG. The palette will appear as a group of rectangles with the exact fills you generated, fully editable.

Related tools