Open the tool in your browser — no install, no download, runs entirely client-side.
A browser-based tool that converts gradient files between 11 formats across design apps, 3D/game engines, and web technologies.
Built on Balakov/GrdToAfpalette by Mike Stimpson. Extended by Colorwav3 with AI assistance (GitHub Copilot / Claude).
| Direction | Format | Software |
|---|---|---|
| Import & Export | .grd (v5) |
Adobe Photoshop / After Effects |
| Import & Export | .ggr |
GIMP |
| Import & Export | .kgr |
Krita |
| Import & Export | .svg |
Any SVG editor / browser |
| Import & Export | .css |
Web (CSS gradients) |
| Import & Export | .afpalette |
Affinity Photo / Designer / Publisher |
| Import & Export | .tres |
Godot Engine |
| Import only | .cpt |
CPTCITY |
| Export only | .py |
Blender (color ramp script) |
| Export only | .py |
Cinema 4D (gradient shader script) |
| Export only | .ms |
3ds Max (MaxScript gradient ramp) |
| Export only | .gradients |
Unity |
- 11 format support — design, 3D, game engines, and web
- CMYK, Lab, Greyscale & Book Color auto-conversion to RGB
- Noise gradient detection — skips procedural noise gradients with a clear warning
- Group-aware — reads Photoshop
.grdhierarchy, browse groups via tabs - Dual export view — switch between "By Software" (grouped) and "By File Type" (flat grid)
- Live preview — scrollable gradient grid with hover zoom
- Batch download — single file, current group, or all groups as ZIP
- 100% client-side — nothing leaves your browser
- Open
index.htmlin a browser (or host it anywhere — it's a static page) - Click Choose File and pick any supported gradient file
- Preview your gradients — use group tabs if the file has groups
- Pick a target format from the export panel
- Hit Download
All non-RGB color spaces are automatically converted on import:
| Source | Method |
|---|---|
| CMYK | R = (1−C)(1−K), G = (1−M)(1−K), B = (1−Y)(1−K) |
| CIE Lab | Lab → XYZ (D65) → linear sRGB (3×3 matrix) → gamma sRGB |
| Greyscale | R = G = B = gray |
| Book Color | Reads embedded RGB fallback; defaults to 50% gray |
Conversions are device-independent (no ICC profiles). Colors may differ slightly from the original application.
- Transparency — Adobe gradients store opacity on a separate track. The converter inserts interpolated stops to approximate it, which may not be pixel-perfect.
- Unity — limited to 8 color keys per gradient (Unity engine limit). Gradients with more stops are resampled.
- Noise gradients — procedural noise gradients in
.grdfiles cannot be converted and are skipped.
.afpalette format
Chunk-based binary: 80-byte header, body, 115-byte footer. A CRC32 checksum (0xEDB88320) over the body is written to two footer positions. Affinity 2 rejects files with invalid checksums.
GRD group hierarchy
.grd v5 files may contain a hierarchy section (8BIMphry → hierarchy → VlLs) with Grup (group start), groupEnd (group end), and preset (gradient ref) objects. Groups can nest; the parser uses a stack to assign each gradient to its leaf group.
Architecture
The .grd parser uses bounded chunk search (GRDSkipToChunkInRange, GRDFindAllChunks) rather than a full descriptor parser. All importers produce a common JSON intermediate format consumed by all export writers:
{ Name, Palettes: [{ Name, Colours: [{ Red, Green, Blue, Alpha, Position, Midpoint }] }], Groups: [] }
Writers:
write_afpalette.js— binary with CRC32write_grd.js— Photoshop GRD v5 binarywrite_ggr.js— GIMP/Krita text formatwrite_svg.js— SVG<linearGradient>defswrite_css.js— CSS custom properties + utility classeswrite_godot.js— Godot.tresresourcewrite_blender.js— Blender Python color ramp scriptwrite_unity.js— Unity.gradientsYAMLwrite_cinema4d.js— Cinema 4D Python shader scriptwrite_3dsmax.js— 3ds Max MaxScript
- Original tool by Mike Stimpson — Balakov/GrdToAfpalette
- Extended by Colorwav3 with AI assistance (GitHub Copilot / Claude)
- JSZip for ZIP archive generation
See LICENSE for details.
This project is not affiliated with Adobe or Serif (Affinity). It is a community project provided under the MIT licence. Use at your own risk — no responsibility is taken for lost work due to crashes or malfunctions.
All trademarks and brand names are the property of their respective owners.