MC Toolkit

Guides / Building & Resources

Matching a colour to a Minecraft block is harder than it looks

Two blocks can look identical in RGB and completely different on a wall, because the game shades every face it renders.

Pick the block whose average colour is closest to your target and you will usually pick wrong. Minecraft does not draw a block as its texture's average colour — it multiplies that texture by a per-face brightness and then by the light level at that position. The colour you sampled from a screenshot is already the product of that shading, so feeding it straight into a nearest-colour search matches against a value no block actually displays.

Why average RGB fails

Average RGB treats the three channels as equally important and as if they varied linearly. Neither is true. Human vision is far more sensitive to differences in green than in blue, and a colour difference of the same numeric size reads as much larger in dark tones than in bright ones. Two blocks can sit at the same RGB distance from a target and look nothing alike on a wall.

CIELAB is built to fix exactly that: equal numeric distances in Lab correspond, roughly, to equal perceived differences. Matching in Lab is why a palette tool can suggest a block that genuinely reads as the right colour instead of one that merely shares a hex code.

The texture is not one colour

A block texture is a square of pixels, and most are not flat. A 16×16 texture holds 256 pixels, and a noisy stone or a mottled leaf texture spreads across a wide range of tones. Reducing it to a single average throws away the variance — which is the part that decides whether a mosaic reads as smooth or as speckled. The palette matcher measures against the real texture files, so the distance it reports reflects what the block actually contains.

Java and Bedrock diverge here

The two editions do not ship identical textures, and they do not shade identically. Java applies directional face brightness and biome tinting through its own pipeline; Bedrock handles tinting and some block colours differently. A palette that matches perfectly in one edition can be visibly off in the other, particularly for grass, leaves and water. Build the palette in the edition you are actually placing blocks in.

From image to mosaic

A mosaic is a grid, and each cell becomes one block. Two things follow from that. First, the image has to be downsampled to the grid size before matching, not after — matching at full resolution and then shrinking produces a palette chosen for detail that no longer exists. Second, the output is a .mcfunction, so the whole build is placed by command rather than by hand. The command count scales with the cell count, not with the image's pixel count.

The transparency trap

Pixels with partial alpha have no single block equivalent. Decide up front whether they become air, a glass variant, or the nearest opaque match, because the matcher cannot guess your intent and will otherwise fold them into whatever solid colour is closest.

Turn an image into a block mosaic with a ready .mcfunction, or find the vanilla block closest to any colour, in the Pixel Art & Block Palette.

Pixel Art & Block Palette →

More guides

Browse all →

Looking for more Minecraft tools?

A suite of client-side generators, viewers and converters — all free, all in your browser.