[need feedback] Fixed sorting of last-used colors in the popup palette

Hi, all!

I’ve been working on quite a weird bug recently. I have a proposed fix but I need to hear your opinion about the issue, because I’m not sure it is correct.

So, the patch is about the Color History Wheel in in the Popup Palette:

The bugreport states that the color history in the popup palette does not coincide with the actual history of the colors used by the user.

When I looked at the code I found that the current implementation has an extremely complicated (and weird) algorithm to manage this list:

  1. it keeps 12 “the most used” colors. That is, not “lastly used”, but “mostly used”. It tracks how many times each color was used.
  2. it sorts the the colors by hue, so they are listed not in the historical order.

I have proposed a patch that removes this complicated algorithm and just adds colors on “12 lastly used colors” basis. What do you think of it? Does this change look acceptable to you? Will it break anyone’s workflow?

Proposed merge request: Switch color history in the popup palette to use last-used sorting (!2266) · Merge requests · Graphics / Krita · GitLab
Packages (Windows + Linux): KDE - Experience Freedom!

1 Like

I think the current way of sorting by color is valid and should be kept. Sorting by history is also valid, but it isn’t superior, just different. So my opinion is that the new way should be an option, with the old way kept as default, to not suddenly change the way it works.

I use the pop-up palette almost exclusively as my way of picking colors, so I am used to the way it currently sorts. The way it sorts by colors doesn’t just make it look nicer, but it allows seeing similar colors side-by-side to compare them. So for instance if I have three different shades of blue, it allows me to easily find them and tell which is which.

A comparison using the last-used colors from the last thing I colored, to try to demonstrate that:
Current, sorted by color. I can easily tell which colors go together.

Proposed, sorted by history. It’s a bit chaotic.

2 Likes

Hi, @freyalupen!

Do you feel like tracking the number of times the colours are used is useful? Do you ever happen to face situation when new colours stop being added to the list because older ones were used to much?

Upd: what if last used 12 colours would be sorted by hue on this wheel, but without the usage count tracking?

1 Like

I would prefer your fix, but if it gets optional, I would say okay, let’s set the hook.

Michelist

From my dev experience every fix will break someones workflow but I would prefer colors being sorted by last used not most used. I rarely pick the same color more than once in a row as a painter but I definitely want to re-select a color I used just a few seconds ago.

Most importantly the palette should work like it is stated in the manual and it also makes sense to have it exactly the same as the color history next to the color selector in the dockers to have it consistent.

Honestly, I can see the value in both ways of sorting the colours. In my opinion the chronological order is more intuitive, both because of the word ‘colour history’ and because that’s how it works everywhere else in Krita. I will admit that I’m a bit biased though because the chronological order better suits my own trial-and-error approach to colours.

There’s definitely room for a “sort colours by…” setting imo, if this could be made to apply to every instance of a color history in Krita.

You cleary forgot the link:

(sorry, couldn’t resist :stuck_out_tongue:)

Anyway, I appreciate having choices, but for me, sorting colors in a linear fashion never seemed that useful, and picking hue even less.
For me, there’s often many colors with similar hue, or low saturation and the low chroma differences give all kinds of hues, so it looks essentially randomized rather than sorted.
Sorting by lightness would be more useful in those cases, but of course not work very well in others…

4 Likes

Can I propose an other variation?

Selecting a color palette and displaying that palette as colors on the palette, which would give the users the possibility to customize their popup-palette - colors

It is just a suggestion, as I rarely use the colors on the wheel. I do uses the color palettes to select my colors. And since I can customize popup side panel in 5.3 it would be redundant, but would also bring the possibility to use the palette and an other docker simultaneously.

I think it can be useful, to keep the main colors at hand instead of rarely-used ones.

I haven’t had a problem adding new colors to the palette. Looking at the code, it seems not to be keeping track of “most times used” exactly but rather a variation on “most recently used”. New colors are the highest priority, and selecting a previous color moves its priority up the list by one (compared to regular history moving it to the top).

So if you pick a red color and a green color, then some other colors, then switch to the red color several times, then use the green color again once, the red color will have more priority to be kept even though it was used less recently than the green one.

I’m thinking there’s probably a reason someone went through the trouble of designing it the way it is. Possibly to attempt to mimic a real painter’s palette, where one would have large amounts of the main colors mixed and easily accessible, and similar colors would be together as a result of mixing from the same base color.

I would be fine with the new way of last-used as default if it seems more popular, though, as long as the old ways of hue-sorted and most-used are still options.

1 Like

Pesonal opinion:
let color history work like “last used color goes to the top”, oldest used color disappears if no more slots are available.

Reason: I try a lot of color variations still I find the one that works. I might switch forth and back between the few last colors if I change my mind. Once happy I might put the chosen color into a custom pallet.
The history is so to say a simple helper tool with very clear functionality “last used colors in historical order”. That works great for me.

Hi, all!

Thanks a lot for your feedback! Given how split the opinions are, I’ve decided to just implement option to switch the behavior. Now you can configure the behavior you want in the Krita Settings:

The full feature with the GUI option is present only in Krita Next (5.3). Krita Plus (5.2.x) has only non-GUI part, so you can configure that by manually modifying a string in kritarc:

popuppalette/colorHistorySorting=“hsv” or “none”

You will be able to test the builds in tomorrow’s nightlies! :slight_smile:

4 Likes

Fine by me :slight_smile: Good job!

I will nevertheless make a feature-request for showing a palette in the color-history, maybe there are others, who also want this feature :slight_smile:

It is already somewhat possible in Krita Next, is it not what you want?

I know and I really like to work that way.
But I had something like this in mind:

You have a new option.
You can change between palette, the old sorting, the new sorting and none. I thought the show checkbox was not neccessary.

If you select palette as option you can select a palette, and those colors are then displayed.

The number of colors is determined in the options, and the colors are picked from left to right from top to bottom of the palette until all slots are set.

As I said it is redundant, but would open the possiblity to have the palette and another docker simultaniously. You also can customize the color history wheel that way.

But that is a complete other feature, so I will create a feature-request for it :slight_smile:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.