Make your own flag overlay for profile pics using Inkscape (Part 2)
In 2015, flag profile pic overlays were very popular for virtue signalling, especially when tragic incidents happened (French flag for Charlie Hebdo, Syrian flag for the civil war). I was not satisfied with the readily available overlays offered by Facebook because most of them darkened the colors. So I made my own using Inkscape (version 0.48 back then) and posted a howto (which I later reposted here in Blogger).
My earlier method was to use overlay colored shapes with 'lighten' blend mode (and lowered opacity for the light-colored areas). That original method also involved cutting out parts of the underlying colored areas if the overlying parts are white or light-colored, otherwise the white will be tinted with the underlying color. Here's the newer method that does not involve tinkering with blend modes, opacity, and cut outs.
Step 1. Import your profile pic
Preferably one with dramatic lighting (high contrast between figure and background a la Caravaggio). Check the 'Link' image import type, not 'Embed' or you'll needlessly enlarge the size of your Inkscape SVG file.
Step 2: Desaturate image
If your image is not yet in grayscale, use Inkscape's 'Greyscale' filter (Menu > Filters > Color > Greyscale), adjust to satisfaction, apply, and close filter settings:
There used to be a 'Desaturate' filter for this. It worked directly on your image and didn't go through any settings.Step 3: Make the overlay
Either import an SVG flag file (there's plenty at Wikimedia Commons) or create your own. You can also import a PNG bitmap but that would darken (reduce saturation of) the colors after reducing opacity (if there are white areas where you want your underlying photo to show through). Make the flag the same size as your image (you'd need to edit the vector shapes for this).
Here's our pretend flag as example:
I've grouped these shapes in a separate layer and renamed the objects via the 'Layers and Objects' palette (Shift+Ctrl+L) for easier handling. [In the old tutorial (Inkscape version 0.48), there was no 'Layers and Objects' palette, only 'Layers' palette.]
Step 4: Center the flag group
Open the 'Align and Distribute' palette and use the align buttons to center your flag on the page.
Step 5 (old method): Overlays
Skip to Step 6 for the newer method.
Originally we just selected the flag shapes group and right clicked it on the 'Layers and Objects' palette and clicked on 'Lighten' blend mode:
White areas (and light colors like yellow) wouldn't show the image underneath and so you have to reduce the opacity of the light shapes (I think 70.8% looks good, from experience). You also need to cut out part of the underlying colored shapes under the white (and other light-colored) shape so that the light colored shapes would not be tainted with shades of the underlying larger part (blue, in this case). Do the same for other light colors (yellow, in this case):
Step 6: Clone the image
You don't need to adjust the opacity, blend mode, or make cut outs for this method. You just need to place parts of the image inside the colored shapes that have been set as clips in clip groups. Here's how to do this:
Select image and clone (Alt+D) into as many colors as there are in the flag. You can also duplicate the image directly (CTRL+D) but this might make your SVG file bigger.
In our case, we made four clones since there are four colors in our pretend flag. Set aside the original for now as we'll need it for comparison with the old method. (If you delete the original, you'll turn the clones into imported linked images which, again, might make your SVG file size bigger.)
Step 7: Apply 'Duochrome' filter to the image clones
Select a clone. Go to Menu > Filters > Color > Duochrome
The Duochrome settings allows you to choose two colors. Have 'Color 2' as white:
Assign 'Color 2' as the color of the colored part you want to clip the clone in. In this case, for convenience, I selected the bottom clone and assigned the hue of the blue area to it using the dropper button (there's a glitch with this tool, you might need to open the 'Duochrome' filter again for the picked color to take effect). Check the 'Live preview' box to see your results:
Do the same for the other clones ('Color 2' for the white part would be a light grey, enough to let the image show through):
Center all the duochromed image clones to the page:
Step 8: Set the colored shapes as 'clip groups'
Using the 'Layers and Objects' palette, select your shape one by one, right click, then 'Set Clip Group':
For convenience, I renamed each clip group as they are created:
Step 9: Drag each clone to the clip group
This is where renaming the objects and clip groups are useful. In the 'Layers and Objects' palette, drag each colored (duochromed) image clone to their corresponding clip group. Just drag the clone over the clip group. Make sure the image clone is placed inside the clip group but outside the 'Clip' subgroup inside the clip group (because that's the clip shape).
The result is very much like overlaying the image with colored shapes but without the need for adjusting opacity and blend mode, and there's no need to cut holes in the bottom-most shape:
If the details of the white or yellow clip group doesn't show well, try selecting the clip group and lowering its opacity (its color saturation would decrease but details will be enhanced). I dropped the opacity of the yellow clip group to 70.8% in this case. Here's the side-by-side comparison (old method, left; new method, right):
I like the way the old method shows grays using the 'Lighten' blend mode of the old method (it looks more interesting, kinda like a tritone). The new method shows more details though.

.png)
.png)
.png)
.png)
.png)

.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
Comments