Four-color reference card
4 colors × 128 px = 512 × 128 PNG
Each color has a solid swatch and a HEX label. The HEX and GPL files store the corresponding RGB values for import.
FREE · IN YOUR BROWSER
Upload a PNG or JPEG to extract colors. Click the image to sample a color, edit the palette, and choose an export format. Images stay in your browser.
No account needed.
PNG or JPEG · 10 MB per file · 4096 px per side · images stay in your browser.
Up to 16 distinct colors; images with fewer colors produce fewer swatches. Shares use nearest colors in a sample up to 256 × 256, excluding alpha at or below 127. MakeCode has 15 visible colors and one transparent slot.
Upload a PNG or JPEG to enable preview and export.
Upload an image with visible pixels and valid colors to enable exports.
Upload a PNG or JPEG to extract colors.
SEE THE MATH
4 colors × 128 px = 512 × 128 PNG
Each color has a solid swatch and a HEX label. The HEX and GPL files store the corresponding RGB values for import.
3 red pixels ÷ 6 visible pixels = 50%
Shares count nearest-color assignments in the sampled visible pixels. They are recalculated after editing the palette.
1 transparent slot + 15 visible slots = 48 RGB bytes
Snapped selections lead the visible slots. Remaining slots are filled from the default palette; sprite pixels are exported by the image converter.
A useful palette starts with the colors that support your picture. A landscape might suggest a dark outline, two greens, a warm highlight, and a muted sky. A game character might need only a few carefully separated colors. This color palette from image tool gives you a starting set, then lets you decide which colors belong in the final result. Upload a PNG or JPEG, choose a color count, and edit the extracted swatches before exporting.
Everything that reads or processes your image runs in your browser. You do not need an account, and this tool does not send the selected picture to a server. Keep your original file and save the palette you want to use: reloading the page clears the current image and edits. Use images you own or have permission to work with, especially when turning an existing illustration into assets for a shared project.
Choose an image with the upload button. PNG works well for sprites, logos, and illustrations with clean color boundaries. JPEG is useful for photographs, although compression can introduce slight variations around edges. The tool accepts files up to 10 MB, with a maximum of 4096 pixels on either side and 16 million pixels in total. Invalid files produce a visible message so you can choose another image.
Set the extracted color count between four and sixteen. Start with four when you want broad color families, or eight when you want room for shadows and highlights. Sixteen can retain more subtle differences, but more swatches do not automatically make a better pixel art palette. If the image contains fewer distinct visible colors than you request, the result contains fewer swatches. A solid red image should produce one red swatch, without invented colors filling empty positions.
The extraction groups similar colors with the shared median-cut quantizer. To keep editing responsive, it samples the image on a grid with a longest side of up to 256 pixels. Large areas therefore influence the palette more than tiny details. A small eye highlight or a single outline pixel may not become an automatic swatch. Add important accents yourself after reviewing the result.
Each extracted color has a six-digit HEX value and its corresponding red, green, and blue values. For example, #ff0000 represents RGB 255, 0, 0. Use HEX when moving colors into a design tool or a stylesheet. Use RGB when your destination asks for three separate channel values. The color chip shows the value currently being used, and valid edits update the export text.
The percentage beside a color estimates how much of the visible sample belongs to that swatch. Every sampled pixel is assigned to its nearest current RGB color. After you remove or change a swatch, the assignments are calculated again. The shares describe the palette you are editing, rather than a permanent measurement of the first extraction. Displayed percentages are rounded to one decimal place, so their visible total can differ slightly from 100 percent.
Transparent pixels with alpha at or below 127 are excluded from extraction and share calculations. Pixels above that threshold count as visible colors. A fully transparent image produces an error instead of a misleading palette. The exported color files contain RGB colors only; they do not preserve a separate alpha value for each swatch. For a sprite with soft transparent edges, inspect its appearance against the intended background before choosing final colors.
Click the preview to sample a color from the decoded original image. This is useful for an accent that automatic extraction missed, such as a bright button, a character's eye, or a small patch of sky. Sampling adds that color to the palette when space is available. If it is already present, the tool tells you instead of adding an identical swatch. Transparent sample points also produce a visible explanation.
For precise selection or keyboard access, enter Pixel x and Pixel y, then use Add sampled color. Coordinates begin at zero in the top-left corner. A 64-pixel-wide image has x coordinates from zero through 63. These coordinates refer to the original decoded image dimensions, even when the preview is displayed at a smaller or larger size. A point outside those dimensions leaves the palette unchanged and asks you to choose a valid location.
Edit a swatch by entering a full HEX value, including the leading hash. Short values, color names, and alpha values are not accepted. An incomplete or invalid value displays an error and disables exports until it is corrected. This prevents a download from silently using a different color from the one you entered. Identical valid colors are combined, and values are normalized to lowercase.
Use New color HEX and Add color for colors that do not come from the image. Remove unnecessary swatches to make room for an outline or highlight. The edited palette supports one to sixteen colors and keeps at least one swatch. When it is full, remove a color before adding or sampling another. Reset extracted colors restores the automatic selection. Changing the extraction count also starts a fresh extraction, so export any edits you want to keep first.
A balanced sprite palette often needs distinct lightness steps more than many similar hues. Check whether the outline, main surface, shadow, and highlight remain easy to tell apart at game size. A photograph can suggest attractive colors while still producing a weak silhouette on a small grid. Use Image to Pixel Art to test a palette-based conversion, or Gradient Map to explore how a few colors describe shadows and highlights.
Copy HEX list gives you comma-separated values with their leading hashes. Copy CSS variables creates a :root block using names such as --color-1 and --color-2. Rename those variables in your own project if you prefer meaningful names such as background, outline, or accent. The visible export text also provides a manual copy option when browser clipboard access is unavailable.
Download HEX file creates a plain-text list with one six-digit color per line and no leading hash. This Lospec-style format is convenient for tools that accept a simple HEX list. Download GPL palette creates a GIMP palette file containing the palette header, decimal RGB values, and numbered color names. Choose the import option that your editor supports; a palette file supplies colors rather than recoloring an image automatically.
Download PNG color card creates a horizontal reference strip. Each color uses a 128 by 128 cell with a solid color area and a white label area showing its HEX value. Four colors produce a 512 by 128 PNG. This is useful for sharing a palette with someone who needs to see the colors, while HEX or GPL is more useful when they need to import the values into another tool.
Enable Snap to MakeCode 16-color palette to match the chosen colors to the nearest visible colors in the default Arcade palette. Several similar source colors can snap to the same entry, reducing the number of distinct swatches. The updated HEX, RGB, percentages, and ordinary downloads reflect the snapped result. Turn the option off to return to the unsnapped selection, or reset the extraction when you want to start again.
MakeCode has sixteen palette entries, but index zero is reserved for transparency. There are fifteen visible color slots. The generated palette code places your selected snapped colors first, fills remaining slots from the default palette, and keeps the transparent entry at zero. You can copy the 48-byte RGB buffer or the palette object for pxt.json. These exports define palette colors; they do not contain sprite pixels or create an animation.
Use the MakeCode Arcade palette editor when you need to customize a complete project palette and preview its effect on a sprite. Use the main image converter when you need image code. For scaling, animation, and other related workflows, return to the pixel art tools directory. Save the palette and the artwork separately so you can reuse the same colors across characters, backgrounds, and interface elements.
Upload a PNG or JPEG, choose 4–16 extracted colors, and review the HEX, RGB, and shares. Click the image to add a sampled color, or edit and remove swatches before copying or downloading the palette.
The requested count is a maximum. Images with fewer visible colors produce fewer swatches. Identical colors are combined, and MakeCode snapping can combine several source colors into one default palette entry.
They estimate nearest-color assignments among visible pixels in an image sample with a longest side of up to 256 pixels. Alpha at or below 127 is excluded. Shares update when the palette changes and are rounded to one decimal place.
Yes. Enter zero-based Pixel x and Pixel y coordinates, then use Add sampled color. Coordinates refer to the decoded original image. Out-of-range or transparent points display a message and do not add a color.
Copy a comma-separated HEX list or CSS variables. Download a labeled PNG color card, a GIMP GPL palette, or a Lospec-style text file with one six-digit HEX value per line. Read-only text fields support manual copying when clipboard access is unavailable.
It exports palette code, not sprite pixels. Colors snap to the nearest visible default Arcade colors. The full palette keeps transparency at index 0 and fills 15 visible slots, placing selected colors first. Use the image converter for sprite code.
No. Decoding, extraction, sampling, editing, and exports run in your browser. This tool does not upload the selected image or save editing history. Input limits are 10 MB, 4096 pixels per side, and 16 million total pixels.
This tool edits the color palette rather than individual image pixels. Use it to choose and export colors, then apply them in your preferred editor. Image to Pixel Art can create a small pixel grid from a photo.