Jump to content

Paint by Numbers

Recommended Posts

I am attaching an Affinity Photo macro that turns a photo into a “Paint by Numbers” image. The attached file is a macros category, and should be imported through the “hamburger” menu at the top right of the Library panel. The category can also be imported into the iPad version of Affinity Photo, although there is one important limitation (more on this later).

When you use the macro, it creates a Group called “Paint by Numbers Effect.” All of the changes are inside of this group, so you can turn it on and off simply. Once you look inside the group, you will see multiple layers. From bottom to top, these are:

1) Original Image - Merge Visible

This is a “merge visible” version of your photo. It includes all of the editing you may have done up until that point.

2) Posterization Adjustment

This is a Posterize adjustment layer, and is meant to reduce the number of colors/tones used in the effect.

3) Outlines

This is a separate layer, created (in part) by using a Detect Edges filter. It provides outlines for the areas of color. This mimics the outlines that were present on the Paint by Numbers boards we used as kids.

4) Normalize Colors

This is a copy of the original Merge Visible image, and has its blend mode set to Color. This is used to reset the posterized colors to more natural ones.

5) Adjust Brightness & Contrast

This is a finishing adjustment, and can provide a better final effect.

* * * * * * * * * * * * * * * * * * * *

Once you click the macro, you will be presented with a default version of the effect. A dialog box allows you to set a number of parameters. As you change each of these parameters, the Paint by Numbers effect is updated. You are asked:

Posterize - How Many Colors?

The default value is 4, but values between 3 and 6 generally give good results. If your image is a portrait, judging the final result by looking at what the different values do to the subject’s face is a good idea.

Outlines - Adjust the Opacity

The default is 50%. Adjust this upward to make the outlines more prominent; adjust it downward to make the outlines less obvious. Set to 0 to make them go away entirely.

Finish - Adjust the Brightness

Finish - Adjust the Contrast

The default is 10% brightness, and 20% contrast. Adjust these up or down to give you final effect the desired finish.

When you click Apply, the effect is finalized. Obviously, you can manually change any of the settings after the fact. However, you should know that while the number of posterization levels for the image is non-destructive, the originally chosen number is also used to create the outlines, and this is a destructive change. Although you can change the posterization level after the fact, it is not advisable to do this. The outlines might no longer line up with the individual areas of color.

Also, for some reason, the iPad version of Affinity Photo handles the macro pretty well but will not allow you to change the number of posterization levels before finalizing the effect. It is baked in at 4 levels. You can change this after the fact, but (as above) the number of levels in your posterized image may not match your outlines very well.

Here is the macro in action. The original image is top left; the parameters dialog is shown in its default state, and then changed during the course of the macro; the final effect is shown top right


As always, I am one person with one computer and have not tested this in every possible scenario. Try it and, if you like it, keep it and enjoy it. This forum has provided me with so many good ideas and answers to questions; this macro is my attempt to “pay it forward.”

[Note: Credit where credit is due. I am indebted to Dave Straker, whose recent YouTube video gave me some excellent ideas for this macro. Dave’s channel is called “InAffinity,” and is a steady source of helpful information. Thanks, Dave!]


Paint by Numbers.afmacros

Share this post

Link to post
Share on other sites

Interesting, works on iPad too but without a dialogue box. Simple matter to select the individual adjustment layers and change settings though.

Many Thanks 

IPad Pro 10.5/512GB lpadOS 13.1.1  Affinity Photo Affinity Design Publisher for iPad ?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.