Kully / pixel-paint

An art tool for making 32x32 Sprites
https://kully.github.io/pixel-paint/
389 stars 25 forks source link

Allow Support for Custom Color Palettes #21

Open Kully opened 4 months ago

Kully commented 4 months ago

It would be very useful to allow the possibility to use your own color palettes. And if this is possible, we would need to come up with a pragmatic and easy way to allow a user to import their colors (eg. maybe copy and paste HEX colors into a text field).

@Kully is already working on a solution for this. Here's a screenshot of the current WIP (branch and Pull Request will eventually come)

image
Viet281101 commented 4 months ago

Hi @Kully , I like the idea of adding custom color functionality from users, but I think it would be more comfortable if we could let users choose their own colors through a small color picker panel like this image.

Screenshot from 2024-05-23 23-21-17

Making something like that isn't really difficult but it will probably change everything of the project's current color selection system. And there may be no more palette.js Or an example of another version of a color picker where we can allow a user to import their colors and they can also create whatever color they want as well:

Screenshot from 2024-05-23 23-19-49

What do you think about my ideas? I just wanted to share with you these ideas because I actually have a bit of experience doing similar things but with my OpenGL, SDL2 projects so i think JavaScript should be able to do the same thing. Although I may not have as much experience with JS as those. Anyway, I still really like this pixel paint tool.

Kully commented 4 months ago

What do you think about my ideas?

@Viet281101 I like these ideas. I like color picker tools myself and they are invaluable in the tools that I use (Adobe Illustrator, Figma, etc.).

However, I think this will be too much change for one Pull Request, and I am afraid that we will lose some of the simplicity that the tool has right now.

Also the main motivation for this PR is that I am coding a Javascript game, and I want to be able to quickly create sprites with pixel paint using the colors from the game engine. The native format is hexcodes, so I thought it would be easiest to allow a copy and paste of codes in the pixel paint UI to allow for this.

Having said that, I can imagine a world where you can both upload your colors and|or you can use a color picker tool.

My favourite is the 2nd one btw.

I will think more about these options and get back to you. :)