FREE · IN YOUR BROWSER

Gradient Map Online

Recolor shadows, midtones, and highlights with an editable gradient. Upload a PNG or JPEG, adjust the colors, and download a PNG with the original dimensions and transparency.

No account needed.

PNG or JPEG · 10 MB per file · 4096 px per side · images stay in your browser.

Upload a PNG or JPEG to enable preview and export.

Gradient colors

Shadows on the left, highlights on the right. Drag a stop or use its position field. Arrow keys move a focused stop by 1%.

Stop 1
Stop 2

Keep 2–12 color stops. Remove is unavailable with only two stops; adding is unavailable at twelve stops or while a field is invalid.

Preview and export

0% keeps original colors; 100% applies the full gradient. The preview samples up to 512 px per side.

PNG keeps the gradient colors and original transparency. Enable MakeCode mapping to copy sprite code.

Gradient map previewNo image yet

Your sprite appears here

SEE THE MATH

Worked examples

Grayscale to sunset

Dark → violet · middle → pink · light → pale yellow

The Sunset preset assigns colors by brightness, without changing the shape or position of your pixels.

Blend with the original

0% original · 50% blend · 100% gradient

Strength mixes the gradient result with the original RGB. Every setting retains the source alpha channel in PNG exports.

An Arcade sprite

16 palette entries = 15 visible colors + transparency

Enable MakeCode mapping for the default Arcade colors. PNG retains partial transparency; copied code uses a binary alpha cutoff.

Recolor an image with a gradient map

A gradient map assigns new colors to the tones already present in an image. Instead of painting a colored stripe across the picture, it looks at each pixel's brightness. Shadows receive colors from the left end of your gradient, highlights receive colors from the right, and everything between them follows the intervening color stops. The outline, texture, and arrangement of the picture stay in place. This makes the effect useful for trying a different mood without drawing the image again.

Start with a PNG or JPEG that you own or have permission to edit. Choose the image, select a preset, and look at the preview before making detailed adjustments. A portrait, a shaded illustration, and a small sprite can all respond differently to the same ramp. Look for the important shapes first: the face should remain readable, the character should separate from its background, and small details should survive at the size where someone will actually see them.

A practical first edit

The Black and white preset is a useful starting point because it reveals the distribution of tones. Dark areas become dark gray and bright areas become light gray. Next, try Sepia for a warm range, Blue and pink duotone for a simple two-color direction, or Sunset for a broader transition. The remaining presets include Thermal, Ocean, Forest, Fire, Violet, and Ink and gold. Each is an editable starting point; selecting one replaces your current color stops.

After choosing a preset, adjust the effect strength. At 100%, the output uses the mapped gradient colors. At 0%, it uses the original RGB values, unless you also enable MakeCode mapping. Intermediate values blend those two results. Try 50% when a full-strength effect hides useful color differences. Compare both shadows and highlights after each change rather than judging the edit from one attractive patch of color.

Understand the color stops

Each stop has a color and a position between 0 and 100 percent. A position near zero affects the darkest tones, a position near one hundred affects the brightest tones, and a middle stop gives you control over midtones. Colors between stops interpolate smoothly in sRGB. A two-stop gradient therefore produces many intermediate shades; it does not restrict the result to only two flat colors.

Use Add color stop to insert another color into the widest interval. The new stop begins with an interpolated color, so adding it does not have to create an abrupt visual change. Change its color with the picker or type a complete six-digit hex value, including the leading hash. Drag its circular handle to change the position, or enter a number in the position field. Keyboard users can focus a handle and use arrow keys for one-percent changes, with Home and End moving to the extremes.

You can keep between two and twelve stops. Remove is disabled when only two remain, and Add becomes unavailable when you reach twelve or have an invalid field. Invalid hex values and positions show an error and pause output until corrected. Stops may share a position, which creates a sharper transition. For a more gradual change, separate neighboring stops and compare the midtone detail again.

Control shadows, highlights, and direction

Moving a stop changes which brightness values receive its color. If your subject occupies mostly the middle of the tonal range, small adjustments near the center may matter more than changing the endpoints. Bring two stops closer together to compress their transition into a narrower range. Move them farther apart for a gentler progression. Areas darker than your first stop hold its color, while areas brighter than your last stop hold the last color.

Reverse gradient mirrors every stop's position. A color previously assigned to shadows moves toward highlights, and the highlight color moves toward shadows. The original image remains the same, so reversing twice restores the original mapping direction. This is helpful when a preset has the right colors but gives the important part of the image too little contrast. Reversal can also make a familiar image look unfamiliar, so check the whole result before exporting.

Brightness and blending in this tool

The mapping measures tone using Rec. 709 luma on the decoded sRGB channel values: red contributes 0.2126, green contributes 0.7152, and blue contributes 0.0722. The value rounds to one of 256 brightness levels. Green therefore has more influence on this brightness measure than blue. Two source colors with similar luma can become very similar after a full-strength mapping even when their original hues were different.

Gradient interpolation and the strength blend operate on sRGB channel values. This is a predictable, compact workflow, but a desktop editor with different color settings or another interpolation method can show a different intermediate color. The tool does not promise a pixel-identical match to Photopea or Photoshop. If matching another workflow is essential, compare exported files using the same source image and the same stop values, rather than relying on preset names alone.

Preserve transparent edges

The PNG output preserves each source alpha value. A transparent background stays transparent, and partially transparent antialiased edges retain their opacity. Strength changes the RGB effect without changing that alpha. There is no automatic white-background removal: a white area in an opaque JPEG remains an opaque area after recoloring. Prepare a transparent PNG in an image editor if the background needs to disappear.

The checkerboard behind the preview helps you inspect transparency. It is a display aid and does not become part of the downloaded PNG. Browsers decode and encode images through their canvas implementation, so very faint edge colors can experience ordinary channel rounding. Save the original separately and use the exported PNG as a new working file. Repeated editing and exporting should not replace your only copy of the source artwork.

Map the result to MakeCode colors

Enable Map to MakeCode 16 colors when preparing art for a project that uses the default Arcade palette. Mapping happens after the gradient and strength blend. Every resulting RGB color chooses the nearest of the fifteen visible palette entries; the sixteenth entry is reserved for transparency in Arcade. This can noticeably reduce a smooth ramp to a few flat regions. Adjust the gradient while the switch is on to see those boundaries.

The PNG still keeps the original alpha values. MakeCode image code has binary transparency instead: source alpha at or below 127 becomes a transparent dot, and higher values become visible pixels. Copied code uses the default palette and supports source images up to 256 by 256 pixels. Larger images can still export a full-size mapped PNG; resize them separately before requesting image code. The MakeCode palette editor explains palette indices and project-wide palette changes.

Choose the next tool for your artwork

Gradient mapping changes color, not image dimensions. Use the pixel art scaler when you need a larger PNG with sharp square pixels or a reduction by an exact integer factor. Scaling first can be useful when the source is too large for MakeCode code export. Scaling afterward can be useful when you have finished a small sprite's colors and need a larger presentation image.

For an animation arranged in a regular grid, download the recolored sheet and open Sprite Sheet to GIF. That tool cuts equal-size cells into frames and lets you choose frame order, speed, and looping. Its default GIF output preserves source colors within GIF palette limits, while MakeCode palette export is optional. Apply one consistent gradient to the whole sheet when the animation needs a stable color treatment across frames.

Export and check the finished PNG

Download PNG saves the original image dimensions, even when the interactive preview uses a smaller sample. The preview samples at most 512 pixels per side to keep stop changes responsive. Inputs must fit all three limits: a file up to 10 MB, no more than 4096 pixels per side, and no more than sixteen million pixels. Large files can take longer to export because the full image is processed locally.

Open the downloaded file and check its dimensions, transparent edges, and most important details. If you need MakeCode code, enable mapping and use the Copy button below the preview. When clipboard access is blocked, the code field can be selected and copied manually. Image processing stays in your browser; there is no image upload, saved editing history, or account requirement. Copy the code or download your result before reloading or leaving the page.

Frequently asked questions

What is a gradient map?

A gradient map replaces image colors according to brightness. Dark pixels use the left side of the gradient, light pixels use the right side, and midtones use colors between your stops. It recolors existing detail without moving pixels.

Are my images uploaded?

No. Image decoding, gradient mapping, preview, and PNG export run locally in your browser. This tool does not send your image to a server, create an account, or save your editing history.

Can I add and move gradient stops?

Yes. Use 2–12 stops, change each color with the picker or a six-digit hex value, and drag the handles to adjust positions. Position fields and arrow keys offer another way to move stops. Reverse swaps the shadow and highlight directions.

Does the PNG keep transparency and resolution?

Yes. PNG exports retain the original width, height, and alpha values, including partial transparency. The interactive preview samples up to 512 pixels per side. Input limits are 10 MB, 4096 pixels per side, and 16 million pixels.

Does this exactly match Photopea?

This tool uses Rec. 709 luma on decoded sRGB values, rounded to 256 brightness levels, with sRGB color interpolation and strength blending. Editor color settings can produce different results. It provides a focused gradient workflow rather than layers, masks, or a full image editor.

How does MakeCode mapping work?

After gradient mapping and strength blending, each RGB color is matched to the closest visible entry in the default Arcade palette. PNG retains source alpha. Image code supports up to 256 by 256 pixels; alpha at or below 127 becomes transparent, and higher alpha becomes opaque.

Can I use the output outside MakeCode?

Yes. Leave MakeCode mapping off for ordinary full-color PNG output. You can use the result in your own artwork, sprites, and layouts, subject to the rights you hold in the source image.