vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.11k stars 91 forks source link

VOXEDIT: Sort & group colors in palettes #76

Closed tsilvs closed 1 year ago

tsilvs commented 3 years ago

Parameters could be:

mgerhardy commented 3 years ago

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

mgerhardy commented 2 years ago

Manual sorting of colors will be in 0.0.20.

mgerhardy commented 1 year ago

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 commented 1 year ago

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

tsilvs commented 1 year ago

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.

mgerhardy commented 1 year ago

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

tsilvs commented 1 year ago

No, I mean something like this

Colors

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

mgerhardy commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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