Gridwright Start for $1

Pixel Art Color Palette Files: GPL, HEX, ASE, PAL, ACT

Pixel art color palettes come as .gpl, .hex, .ase, .pal, .aco and .act. What each file holds, which apps read it, and how to move one into Aseprite or Godot.

Palette Converter at work
Palette Converter at work: Your palette in every format your apps read: .gpl, .ase, .aco, .act, .pal, .hex, Godot and more.

You found the palette your game should use. The palette site offers it as .hex, .gpl, .pal, .ase and a PNG, so you take the .ase because it sounds like Aseprite. Aseprite won't load it. The artist on your team works in Photoshop and asks for an .aco. Your old palette is a .pal that opens in one program and not the next, and in Godot you end up typing sixteen hex codes into the inspector one by one.

It's the same sixteen colours every time. What differs is the file around them, and two of these formats share an extension with a completely different file. This guide covers what each format holds, which apps read it, the two traps, and how to load a palette in Aseprite, GIMP, Photoshop and Godot 4. The Palette Converter reads all of them and saves your palette in the ones your apps need.

The formats at a glance

FormatKindWhat it keepsRead by
.hextextcolours onlyLospec, Aseprite
.gpltextcolours, names, columnsGIMP, Krita, Aseprite, Pixelorama
.pal (JASC)textcoloursAseprite, Paint Shop Pro, GrafX2
.pal (Microsoft RIFF)binarycoloursGIMP and older Windows tools
.ase (Adobe Swatch Exchange)binarycolours, names, groupsPhotoshop, Illustrator, InDesign, GIMP 3
.acobinarycolours, namesPhotoshop, GIMP 3
.actbinaryup to 256 coloursPhotoshop, Aseprite, GIMP 3
Paint.NET .txttextup to 96 colours, alphaPaint.NET
PNG strippicturecolours, alphaany pixel editor
Godot .trestextcolours, alphaGodot 4
2D Lights & Glow
2D Lights & Glow: Pixel and smooth 2D light textures: radial, cones, window shafts, god rays, animated flicker. One of the 150 packs in Gridwright.

The text formats: .hex, .gpl and .pal

.hex is the simplest: six hex digits per line and nothing else. Lospec's download of Sweetie 16 starts like this:

Cartoony Game UI for Roblox
Cartoony Game UI for Roblox: 383 glossy UI pieces in 6 colours: buttons, shop, daily rewards, spin wheel, codes. One of the 150 packs in Gridwright.
1a1c2c
5d275d
b13e53
ef7d57

There's no #, no names and no alpha. Aseprite saves .hex the same way, in lower case, and reads lines with or without a #. Because it holds nothing but colours, it's the easiest palette to share and to read in your own code.

.gpl is GIMP's palette, and Aseprite, Krita and Pixelorama read it too:

GIMP Palette
Name: Sweetie 16
Columns: 8
#
 26  28  44	1a1c2c
 93  39  93	5d275d
177  62  83	b13e53

The first line must say exactly GIMP Palette. Name: and Columns: are optional, and lines starting with # are comments. Each colour is red, green and blue from 0 to 255, followed by an optional name. Lospec puts the palette's name in a comment and names every colour after its own hex code. When a palette has see-through colours, Aseprite adds its own Channels: RGBA line and a fourth number on each row.

.pal from Paint Shop Pro, known as JASC, has a header, a version and the number of colours, then one colour per line:

JASC-PAL
0100
4
26 28 44
93 39 93
177 62 83
239 125 87

It has no names. Aseprite reads and writes this kind of .pal.

Two traps: .ase and .pal each mean two things

.ase is two unrelated files. Aseprite saves its sprites as .ase (or .aseprite), and Adobe's swatch format, Adobe Swatch Exchange, also ends in .ase. Aseprite's Load Palette reads .gpl, .hex, .pal, .act, .col and its own sprites, but it has no reader for Adobe swatches, so the .ase from a palette site fails to load. The Adobe kind holds groups and names, and each colour can be stored as RGB, CMYK, Lab or grey. Photoshop, Illustrator and InDesign read it, and so does GIMP 3.

.pal is two unrelated files too. One is the JASC text above. The other is Microsoft's RIFF palette, a binary file. Aseprite reads only the text kind and gives up when the first line isn't JASC-PAL. GIMP imports the RIFF kind. To tell them apart, open the file in a text editor: the text kind starts with JASC-PAL, the Microsoft kind with "RIFF" and unreadable bytes.

Photoshop's two binaries: .aco and .act

  • .aco holds the swatches of Photoshop's Swatches panel. Each colour has a colour space (RGB, HSB, CMYK, Lab or greyscale) and four 16-bit values. Swatch names come in a second section that newer files add after the plain colours. An entry taken from a colour book such as Pantone stores only its book number, so other apps can't show that colour.
  • .act is a colour table for indexed images: 256 colours, 3 bytes each, so 768 bytes in total. Newer files add 4 bytes for the number of colours used and which one is transparent. In Photoshop it loads when the image is in Indexed Color mode, under Image > Mode > Color Table. Aseprite reads and writes .act too.

CMYK swatches have to be turned into screen colours outside Photoshop, without its colour profile, so they can come out slightly different from what Photoshop shows.

Load a palette in Aseprite, GIMP and Photoshop

  • Aseprite: click the options button at the top of the palette (the three lines) and choose Load Palette. Save Palette writes .gpl, .hex, .pal, .act or .col, and Save Palette as Preset puts the palette under Presets.
  • GIMP: open Windows > Dockable Dialogs > Palettes, right-click the list and choose Import Palette..., then pick the file. GIMP 3.0 imports .gpl, .aco, .ase, .act, RIFF palettes, Paint Shop Pro palettes and CSS.
  • Photoshop: open Window > Swatches, then choose Import Swatches from the panel menu and pick the .aco or .ase.

Palettes in Godot 4

Godot 4.7 has a ColorPalette resource. It's a .tres file whose colors property is a list of colours, and Godot's documentation says the ColorPicker can load and save it. This is the file the converter writes:

[gd_resource type="ColorPalette" format=3]

[resource]
colors = PackedColorArray(0.101961, 0.109804, 0.172549, 1, 0.364706, 0.152941, 0.364706, 1, 0.694118, 0.243137, 0.32549, 1, 0.937255, 0.490196, 0.341176, 1)

Put it in your project and use the colours from code, for example to snap a tint to your palette:

extends Node

const PALETTE: ColorPalette = preload("res://palettes/sweetie16_palette.tres")

func nearest(c: Color) -> Color:
	var best := PALETTE.colors[0]
	var best_d := INF
	for p in PALETTE.colors:
		var d := Vector3(c.r - p.r, c.g - p.g, c.b - p.b).length_squared()
		if d < best_d:
			best_d = d
			best = p
	return best

For palettes a player or a mod adds while the game runs, read a Lospec .hex directly:

func load_hex(path: String) -> PackedColorArray:
	var colors := PackedColorArray()
	var file := FileAccess.open(path, FileAccess.READ)
	if file == null:
		return colors
	while not file.eof_reached():
		var line := file.get_line().strip_edges()
		if Color.html_is_valid(line):
			colors.append(Color.html(line))
	return colors

Call it with a path such as user://palettes/sweetie-16.hex. We ran both pieces in Godot 4.7.2: the .tres loads as a ColorPalette with its 4 colours, the .hex reads back the same 4, and nearest() turns #c04050 into #b13e53.

The converter also writes a Godot Gradient .tres with one hard band per colour. That's the file for shaders, and pixel art color ramps shows how to use it.

Convert a palette in one go

Converting by hand means a different program for each format, and each one can quietly drop names or groups along the way. The Palette Converter does it all in your browser, and your files stay on your computer.

  1. Drop a palette file, or several at once, in any format above (Aseprite sprites, JSON and CSS too), or paste hex codes under Or paste colours. The converter goes by what's inside the file, not its extension, so both kinds of .ase and .pal come out right.
  2. See what it read: the number of colours, their names and groups, and any alpha. Notes tell you which colours were stored as CMYK or Lab and converted to screen colours, and which colour-book entries had to be left out.
  3. Tidy it up: Drop repeated colours, set the Order (as in the file, dark to light, or by hue), give it a Palette name, and when you dropped several, tick Merge to make them one palette with a group each.
  4. Pick the formats under Save as: every format in the table but the RIFF .pal, plus a Godot Gradient, JSON and CSS. Each file says what it keeps and what it can't hold, such as names in a .hex or more than 256 colours in an .act. A tick means the converter read the file back and got the same colours. Click a file to see what's inside it.
  5. Download the palette files (ZIP): every format you ticked, plus a README that lists what each file keeps and every colour.
Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

FAQ

Which palette format should I use for pixel art?

Use .gpl when you want the most editors to read it: GIMP, Krita, Aseprite and Pixelorama all do, and it keeps colour names. Use .hex for Lospec, Aseprite and your own code. Keep an .ase or .aco for anyone working in Adobe apps.

Why won't my .ase palette open in Aseprite?

Most likely it's an Adobe Swatch Exchange file. Aseprite's .ase is a sprite, and Aseprite has no reader for Adobe swatches. Convert the file to .gpl or .hex and load that instead.

Get your palette into every app

Drop your palette into the Palette Converter and take every format your team needs. The Color Palette Extractor pulls a palette out of a picture, the Pixel Palette & Shading Ramp Maker builds shading ramps, and the Palette Swapper puts a palette on a sprite. All four are among Gridwright's 44 tools, alongside 150 asset packs.

Color Palette Extractor: The palette of any picture, with pixel counts
Color Palette Extractor: The palette of any picture, with pixel counts. Included in Gridwright.
Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes