Introduction to Color Mosaics and Geometric Tessellations
A Color Mosaic is a beautiful form of digital tessellation that breaks down a raster image into a grid of independent, repeating geometric tiles (such as squares, circles, triangles, or hexagons). Each individual tile acts as a discrete cell that is rendered as a solid color. This color is mathematically derived from the average hue and luminosity of the image pixels covered by that tile, creating the appearance of classical Roman stone work, stained glass windows, or modern pixel-art mosaics.
The Mathematics of Color Averaging in Mosaic Tiles
For any given mosaic tile covering a rectangular bounding region $S$ with width $W$ and height $H$, the average red ($\bar{R}$), green ($\bar{G}$), and blue ($\bar{B}$) values are computed by integrating the individual pixel colors over the tile area: $$\bar{R} = \frac{1}{|S|} \sum_{(x,y) \in S} R(x,y)$$ $$\bar{G} = \frac{1}{|S|} \sum_{(x,y) \in S} G(x,y)$$ $$\bar{B} = \frac{1}{|S|} \sum_{(x,y) \in S} B(x,y)$$ Where $|S| = W \times H$ is the total count of pixels in the sampling region. This average color represents the best uniform representation of the local region, minimizing color variance and preserving global image readability even at extremely large tile sizes.
Hexagonal Tessellation Math
Unlike simple rectangular grids, regular hexagons do not pack in a straight Cartesian grid. To tessellate perfectly, hexagons are packed in an offset rows pattern. For a hexagon of radius $r$, the horizontal spacing between columns is: $$\Delta x = 1.5 \cdot r$$ And the vertical spacing between offset rows is: $$\Delta y = \sqrt{3} \cdot r$$ For odd columns, the center coordinates are shifted vertically by $\frac{\Delta y}{2}$. This hexagonal packing layout yields a highly organic, honeycomb-like visual flow that is much more aesthetically pleasing than simple squares.
Also check out Pixel Sorting Tool, Mix Pixels in Image, and Convert Text to Pixel Art.
Frequently Asked Questions
What is a color mosaic tool?
A color mosaic tool divides any input image into small geometric tile shapes (such as squares, hexagons, or triangles) and colors each tile with the average color of its local pixel area to generate beautiful, classical tiled mosaic artwork.
How does grout gap size and grout color affect the output?
The grout gap adds spacing between individual mosaic tiles, which is filled with your chosen grout color (e.g. slate grey or black). This spacing breaks the image up into distinct visual components, giving it the physical texture of a traditional stone, glass, or ceramic mosaic wall.
What does the "Texture Variance" setting do?
Texture variance introduces a small amount of random color noise to each tile. In natural stone or hand-cut glass mosaics, no two tiles are perfectly identical in color. Adding a subtle variance breaks the uniform digital appearance, creating a much more organic, hand-crafted look.
Can I limit the number of colors in the mosaic?
Yes! Under the "Mosaic Color Palette" dropdown, you can select palettes limited to 8, 16, 32, or 64 colors. This quantizes the tile colors into a specific restricted palette, generating retro 8-bit or stylized color-limited vector-like aesthetics.