Invert and Hue

Is something not working like it should? Let us know.
User avatar

2018-03-25 09:53:17

(Pixelmator Pro 1.0.9 on macOS 10.13.3 on MacBook (Retina, 12-inch, Early 2015))
(Color Profile set to Universal)

I was doing some work with primary colours and when applying the invert adjustment, I didn't get the colour I expected. I expect RGB(255,0,0) to invert to RGB(0,255,255), instead I got RGB(0,57,57). So I tried doing a hue adjustment of 180 degrees (which Pixelmator Pro lists as 100%) and got RGB(0,187,187).

Sensing that something weird is going on here, I applied invert to blocks of RGBCMY (ordered RYGCBM), flattened the adjustment and re-inverted it to see if it got back to the original colours. I repeated this by changing the hue 180 degrees. Results are below:
Image
I hope you can reproduce the effect and hope you can tell me what is going on.

Thanks,

- Stef.
P.S. There's also some strange blur happening between the boxes that have been inverted/hue adjusted. Zoom in to have a look.
User avatar

2018-04-03 08:03:58

Right now, the color adjustments in Pixelmator Pro work in a specially-designed perception-oriented color space. Basically, instead of working in a purely mathematical way on each RGB channel, they take into account the perceptual differences between those primary colors at different intensities and so on, which tends to give much more pleasing results when applying adjustments to photos for artistic purposes. This is also applicable to the Hue and Invert adjustments. However, I do see how that might not be the best option as these two are often used for pure inversion/hue shifting purposes. I've now made a note of this internally and we'll see what we can do to improve it. In the meantime, the color adjustment effects (Hue Adjust and Invert) work purely mathematically rather than perceptually, so you should be fine if you used them for this purpose.
User avatar

2018-04-03 08:09:19

P.S. We're seeing the blur too — that's appearing due to some internal processes which improve image and color quality. Again, generally a positive thing, but not in this case and the effect equivalents of these adjustments won't have this issue.
User avatar

2018-04-03 11:16:07

Hi Andrius.

Thanks for getting back to me.

This is not the first time a feature of Pixelmator Pro has tricked me into thinking it's a bug. It's really cool to have advanced features such as a perceptual colour model but if I don't know that those features are there and how they work, those advantages are negated by the frustration of a tool not working the way I expect it to. Plus, you have deal with the user education following a bug report.

I'm not sure what the answer to this is. Maybe tools could have a 'perceptual' or 'mathematical' indicator. Maybe the drop-down on an effect or adjustment could contain an 'about' option that gives you detail on how the tool works. Maybe an expert user guide explaining all this. I don't know... I'm just brainstorming.

I've got one question, though. Are all the Adjust Colors tools perceptual and all the Add Effects tools mathematical, or is it more complex than that?

I think still seeing a bug, too. Although Add Effects > Invert does a pure mathematical invert, Add Effects > Hue Adjust doesn't seem to. Could you have a look at that?

Thanks,

- Stef.
Image
User avatar

2018-04-03 14:11:57

At Pixelmator, our aim is (perhaps not surprisingly) — it should just work. So when it comes to thinks like Invert, the adjustment should invert purely mathematically rather than perceptually because that's the most expected and most useful option. The solution here is probably not a checkbox or an explanation or an extensive user guide, but a change in functionality and we'll be fixing this in the future. With the Hue adjustment, we feel the perceptual aspects of the adjustment are important so we'll probably be leaving things as they are. In this case, I'm not entirely sure if there's any need to indicate this in the interface, but it may be worthwhile to have a note about it in the user documentation.

All the color adjustments work in a perceptually-adjusted color space, except for the Channel Mixer adjustment and the Levels and Curves adjustment when editing the RGB channel. The color adjustments are all coded from scratch by us. The Color Adjustment category of effects mostly use the Core Image filters built into macOS. I can't guarantee whether they're all purely mathematical, but I'd be inclined to think so. It looks like the Hue Adjust effect is an exception, but this is most likely due to a bug. To fix it, we'll either create our own hue adjustment effect or get the bug fixed in Core Image.
User avatar

2018-04-03 15:51:05

Thanks for another great explanation. I now know how to drive Pixelmator Pro better than before. There is something bugging me about the way the perceptual colour space works but it may well be that I just need some time to wrap my head around how it works. I'll get back to you if that feeling develops into something I can put into words.

Thanks again,

- Stef.
User avatar

2018-04-09 13:17:17

(Pixelmator Pro 1.0.9 on macOS 10.13.4 on MacBook (Retina, 12-inch, Early 2015))
I've been playing with hue (Colour Adjustments > Hue and Saturation) on and off over the last week and this is still bugging me. I have found that for muted colours, the changes that it makes are more of less reversible (a 10% hue shift from colour x can be reversed by a -10% hue shift). But, if I do the same with a bright colour, it will hue shift to a duller, darker colour. An example of this is shown below where there is a 180° (100%) shift from 1 to 2 to 3 to 4 to 5.
Image
Once the colour has shifted to this muted colour palette, it seems to produce a reversible result (2 looks like 4 and 3 looks like 5).
It almost seems as if there is a restricted gamut that is being used as once I have transformed an object to the muted colours I can traverse these easily, but can never get back to the bright ones using the hue comtrol alone. Also where in object 1, the colour fades smoothly between the primaries, 2,3,4, and 5 have noticable stripe where one primary colour fades into another.
If I try to preserve the colour brightness by upping the saturation when I change the hue, this stripe becomes more noticeable (below):
Image
Is there anything I can do to help me understand what is going on here? Have you used a documented percetual colour space that I can read about online? Or do you have some design documentation that I can read to inform myself? Because at the moment, to me, that still looks broken.
User avatar

2018-04-09 14:27:19

There's one thing I didn't mention in my previous comment — due Pixelmator Pro using a perceptual model, changes to the hues in your image can result in color clipping. If you looked at a chromaticity diagram of almost any color space, you'll notice that certain colors appear more saturated than others. Here's a diagram of the sRGB color space (sRGB colors are located within the white triangle, areas outside it are outside the sRGB color space):

Image

The brightest reds appear much more intense than the brightest orange hues, for example. Let's say you shifted the hues in an image and the most intense reds changed to oranges — those intense reds would become relatively less intense oranges. If you flattened the changes and shifted the hues back, it would be a little weird for the fairly dull oranges to become bright reds. However, that's what happens in certain other apps because instead of moving the colors along, more or less, a circle, they move them relative to the edges of the triangle. The upside to this is that changes to hues are reversible. The downside is they're not all that logical (if you asked a person to pick the opposite of an edge-of-gamut cyan, they probably wouldn't go for the brightest possible red).

One way to minimize this is editing your images with a wide gamut profile (Display P3 or ACES CG Linear, for example) and in 16-bit color. If you're editing an 8-bit image, make sure to first convert it to 16-bit color and only then change the color profile to prevent color loss.
User avatar

2018-04-10 17:03:07

Thanks again, Andrius, for a really informative reply. I'm guessing that most of the filters in Color Adjustments are coded from scratch and don't have direct equivalents in the original Pixelmator. I think I'm getting an idea of the amount of work that has gone into creating Pixelmator Pro.

I'm going to stop pulling on this thread for now. My understanding of Pixelmator Pro is now that most of the filters in Color Adjustments work best for continuous subtle tones as found in photographs and most of the filters in Add Effects work best for strong graphic work where a boldness of colour might be more significant than perceived accuracy. As I'm not doing much photography at the moment and am doing more design work, I think that my first port of call should be Add Effects before Color Adjustments.

I may return to testing Hue and Saturation but, if I do, it will probably be with the focus of perceived hues rather than numerical accuracy.

I do want to bring up something you said earlier, though:
At Pixelmator, our aim is (perhaps not surprisingly) — it should just work.
That, in short, is why I use a Mac.
User avatar

2018-04-12 11:53:34

by st3f 2018-04-10 17:03:07 I think I'm getting an idea of the amount of work that has gone into creating Pixelmator Pro.
A great deal more than might appear at first glance. :grinning: And that's totally understandable, it does seem like you should be able to just copy code from one app to another and everything should work. Unfortunately, it very rarely does. Essentially, almost every single part of Pixelmator Pro has either been coded from scratch or has code that's been rewritten almost entirely. Obviously, that's not something that should matter to the average user because the point is having an app that works well. But Pixelmator Pro is an entirely new app.