Skip to main content
Participant
Apr 15, 2025 6:39 AM UTC
Question

Placing numbers in the center of mosaic tiles

Hello.

I have been making "paint by number" mosaic tile posters in illustrator. 

So I transform image to mosaic, collect swatches from the image and then merge them so I get cca 10-15 colors. Then group each color squeres and replace color with appropriate number.

The thing that is bugging me is that numbers I apply in the squeres are not always central. I have been using patterns - I create a pattern for each number in the size of my square, then apply each pattern to 1 group of colors. 

 I can not seem to figure out how to really keep it in the center all the way over the poster (it is cca 5 m long).  Even if it is central in the beginning it slides a bit left towards the end of the graphic.

 

Is there some other, better or more accurate way? 

Or a pattern treatmant that would allow more accuracy - or just something I dont understand and would help?

 

Thanks for any suggestion or insight if you ever did sth. similar.

Tinka

5 replies

Ton Frederiks
Community Expert
Community Expert
Apr 21, 2025 10:00 AM UTC

Before aligning I would apply the Use Preview Bounds and Effect > Path > Outline Object.

Instead of a Pattern I would use a Static Symbol and replace the colored tiles with the Symbol.

 

Translate
Ton Frederiks
Community Expert
Community Expert
Apr 21, 2025 11:32 AM UTC

To replace the color with a Symbol or any object:

Make sure that the number symbol is the top object.

Select the color you want to replace with the number, use Select > Same > Fill Color

Select the top object number symbol and use the Copy to Object(s) script.

https://github.com/johnwun/js4ai/blob/master/copyToMultipleObjects.js

Translate
Community Expert
Apr 21, 2025 3:15 AM UTC

The first thing to try is opening the Align panel and in the flyout menu choosing the option Align to Glyph Bounds. That will allow you to align a numeral to another object via the number's geometric shape rather than the rectangular Em square surrounding it. This solution will work in a lot of cases. But if the target shapes are unusual you'll have no other choice than eye-balling the number into a desirable looking position. Sometimes the mathematical center doesn't look like the visual center.

Translate
Ares Hovhannesyan
Community Expert
Community Expert
Apr 20, 2025 10:01 AM UTC

May be you can use Split into Grid option from Object->Path->Split into Grid to split the object into small rectangles.?

Translate
Monika Gause
Community Expert
Community Expert
Apr 19, 2025 5:29 PM UTC

I don't think I can follow. Could you perhaps post screenshots?

Translate