How can I make a 2-color square like this?

Discuss Pixelmator Pro tutorials and share useful resources.
User avatar

2020-02-18 19:58:21

I'm admittedly not a design whiz...but I'm pulling my hair out trying to figure out an easy way to make a 2-color square like this. Any ideas?

Image
User avatar

2020-02-18 21:00:15

Hi brandonuttley.

There are so many ways of doing this that I want to run a quick checklist:
1. What version of Pixelmator/Pixelmator Pro are you running?
2. Does the centre have to be transparent or can it be white (white is easier, transparent is more fun)?
3. Are you familiar with drawing shapes (as vector graphics)?
4. Are you familiar with subtracting one shape from another?

I'll be about for the next couple of hour and will check back periodically. The questions above will save me writing you some instructions that you might find useless because, for me, the easiest way and fastest way of doing this may involve delving deeper into vector graphics than you are comfortable with.

- Stef.
User avatar

2020-02-18 23:06:07

Hi, I am running Pro v. 1.5.5.

The center could be transparent for sure.

I am familiar with drawing shapes and have messed around with combining them. But for some reason, I can't replicate this simple shape.

I really want the color on the 'left' of the square to look like the letter L shading-wise (so like the left and bottom portions).

Thanks for your advice!
User avatar

2020-02-19 00:07:12

OK... here's how I'd do it. Picture the logo as a dark blue square with a smaller square cut out of it. On top of that is a light blue triangle with the same small square cut out of it.
1. Create four squares, two the size of the outside of the logo and two the size of the cutout. I drew one of each and duplicated them.
2. Align all four by centre and arrange them in the layers panel so that they are (from top to bottom) small square, big square, small square, big square.
3. With the Style tool colour the bottom big square dark blue (no stroke or shadow) and the upper big square light blue (no stroke or shadow). You don't have to worry about the colour of the little squares as we're just using those for geometry.
4. Select the upper big square (the light blue one) use the menu option Format > Shapes > Make Editable (a right click on it in the canvas would also reveal that menu option). The selection squares in the corners will change to circles indicating where the nodes are.
5. Right-click on the node in the bottom left and select and select Remove Point. This will delete the corner node of the square leaving you (hopefully) with an appropriately proportioned triangle. We could have drawn the triangle from scratch but, since it shares three corners with the big square, it makes sense to me to start with a square.
6. In the layers panel click on the bottom big square (the dark blue one) then shift click on the small square above it. This should select both shapes.
7. In the layers panel, right-click on the small square that forms the upper layer of the selected pair. In the menu that pops up, click Subtract. This will remove an area the size of the small square from the big square.
8. Repeat 6 and 7 with the triangle and the square above it to cut the square out of the triangle.
Job done.
Image
If any of this didn't work let me know where (and how) it fell apart and I'll do my best to fix. And, if you're wondering why I'm putting a square under a triangle rather than butting two triangles against each other, the answer is sub-pixel rendering. Two identical 45° slopes butted against each other and rendered to pixels will show daylight between them and I don't want that.
Hope this helps.
- Stef.
User avatar

2020-02-19 17:54:02

It worked for me. Wow! I would have never figured that one out on my own. Thanks, Stef!

Image
User avatar

2020-02-19 22:08:34

Thanks for testing it out. When I type out a set of instructions like this, I always worry that I've missed out something important.
User avatar

2020-02-20 14:29:06

And, if you're wondering why I'm putting a square under a triangle rather than butting two triangles against each other, the answer is sub-pixel rendering.
Literally the first thing I tried. Then felt kinda silly that I didn't read your post the whole way through.
User avatar

2020-02-20 14:51:32

It's only a single line of pixels with (by my calculations) 75% opacity but I'd rather not have that... unless I was designing for print and had to manually separate spot colours... in which case that is how I'd proceed.

For those that are wondering why you can see transparency between two shapes that fit exactly, consider the very top left pixel of this shape. The upper layer covers 50% of this pixel and therefore contributes 50% of the colour of this pixel leaving 50% transparent. The lower layer (if it was a triangle) would also render as 50% colour, 50% transparent but would only show through the transparent 50% of the pixel. So the pixel would end up being 50% upper colour, 25% lower colour and 25% transparent. Putting a square underneath (or doing some clever trapping so that one shape overhangs) means that you get 100% of the transparency taken up by the lower colour so that the colours mix 50% to 50% at this pixel.

For those that don't care, yes, I am talking about an error in an area that is only a pixel wide.
User avatar

2020-02-20 15:03:37

Yeah, I think this is probably best explained by "opacity maths" — a 50% opaque pixel + another 50% opaque pixel doesn't equal a pixel with 100% opacity, which can be majorly unintuitive at first.