vengi icon indicating copy to clipboard operation
vengi copied to clipboard

VOXEDIT: Sort & group colors in palettes

Open tsilvs opened this issue 3 years ago • 2 comments

Parameters could be:

  • hue
  • saturation
  • brightness
  • etc.

tsilvs avatar Mar 28 '21 20:03 tsilvs

Also see issue https://github.com/mgerhardy/engine/issues/74

mgerhardy avatar May 09 '21 18:05 mgerhardy

Manual sorting of colors will be in 0.0.20.

mgerhardy avatar May 24 '22 07:05 mgerhardy

You can now re-order the colors in the palette widget via drag and drop - if you hold the ctrl key the colors are replaced without changing the look of the model.

mgerhardy avatar Feb 10 '23 16:02 mgerhardy

Bildschirmfoto vom 2023-02-10 17-43-31 Bildschirmfoto vom 2023-02-10 17-43-28 Bildschirmfoto vom 2023-02-10 17-43-25

finally implemented - but i need to find a better place in the ui

mgerhardy avatar Feb 10 '23 16:02 mgerhardy

It might be better to place more darkened colors in starts of the rows and more lightened in the ends somehow while the colors being grouped by hue.

Using HSL color scheme model might be a good idea.

Depends on grid implementation that you've made.

tsilvs avatar Feb 11 '23 09:02 tsilvs

Do you mean to sort into the different direction? I can do asc and desc sorting easily if that’s what you mean

mgerhardy avatar Feb 11 '23 09:02 mgerhardy

No, I mean something like this

Colors

Horizontally it is sorted by lightness, vertically - by hue.

tsilvs avatar Feb 11 '23 09:02 tsilvs

That’s going to be harder as you can change the dimensions of the palette panel and thus would reorder the palette each time

i begin to understand why magicavoxel introduced the imap chunk and made the ordering of the palette widget independent from the real color indices.

mgerhardy avatar Feb 11 '23 09:02 mgerhardy

I've now implemented palette indices, too - sorting is now possible without really changing the palette. The sorting algorithm that produces an order as you've shown in the screenshot is still a mystery for me though. Need to do some research on this.

mgerhardy avatar Feb 11 '23 14:02 mgerhardy

https://www.alanzucconi.com/2015/09/30/colour-sorting/

mgerhardy avatar Feb 11 '23 14:02 mgerhardy