Skip to main content
Participant
April 15, 2025
質問

Placing numbers in the center of mosaic tiles

  • April 15, 2025
  • 返信数 4.
  • 342 ビュー

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

返信数 4

Ton Frederiks
Community Expert
Community Expert
April 21, 2025

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.

 

Ton Frederiks
Community Expert
Community Expert
April 21, 2025

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

Community Expert
April 21, 2025

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.

Ares Hovhannesyan
Community Expert
Community Expert
April 20, 2025

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

Monika Gause
Community Expert
Community Expert
April 19, 2025

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