pixel-paint icon indicating copy to clipboard operation
pixel-paint copied to clipboard

Feature: Create and Edit Custom Color Palettes

Open Kully opened this issue 1 year ago • 6 comments

What is this Pull Request For

This PR is to allow users to customize their own colors, and then export them in a code-friendly format. The higher vision is to help aid game devs and game artists (and anyone else honestly) who is building pixel art and need the format to play nice in their environment of choice.

Tasks

  • [x] Use custom colors for the palette
  • [x] Overlap the active color preview (like Photoshop does)
  • [x] Add a Copy to Clipboard button
  • [ ] Clean up the format of code you get when you press Copy to Clipboard
  • [ ] Allow user to make their own color palette
  • [ ] Allow toggling between colors palettes
  • [ ] Restore the old NES and GameBoy color palettes so reverse-compatible
  • [ ] #30
  • [ ] Allow editing your custom palettes

Somday/Maybe Tasks (might be out of scope for this PR)

  • [ ] Add a color picker (other color tools could be useful too)
  • [ ] Allow different canvas sizes (8x8, 16x16, 32x32 seem the most reasonable)
  • [ ] Add animation capabilities
    • [ ] Add a new frame
    • [ ] Delete a frame
    • [ ] Cycle between frames (assign durations to each)
    • [ ] If #35 is done, ensure copying between frames works
  • [ ] Allow people to place guidelines on the canvas
    • Quartlie Lines (thick red line) / Octile Lines (thin red line)
  • [ ] Allow saving your custom palettes somewhere (perhaps locally as a JSON file that you can reference; then we could add JSON to .gitignore so that saving your color palettes would place nice with git commits)

More on the Motivation

I am personally working on a game engine. It would be amazing to be able to repurpose some of this project to allow myself, and other game makers, to use this engine for their personal development.

Design (in progress)

image

Kully avatar Sep 12 '24 11:09 Kully

@Viet281101 @jkl3848 @aleksi100 @Luca-Ilari @R-Lovelett

CC'ing all the contributors of this project to get thoughts on this effort.

I don't want to ruin anyone's experience or break things that y'all are enjoying about this tool.

Feel free to weigh in if you have any ideas, thoughts, interests. :)

(I am curious to know if there are any game devs here that may have thoughts, especially if they use other software.)

Kully avatar Sep 12 '24 11:09 Kully

Are you planning on making Pixel Paint mobile-friendly? I know this might be a bit tricky to adjust, but if you want I'm willing to participate if I have time.

Viet281101 avatar Sep 28 '24 13:09 Viet281101

Are you planning on making Pixel Paint mobile-friendly? I know this might be a bit tricky to adjust, but if you want I'm willing to participate if I have time.

@Viet281101 I was not planning on making it mobile-friendly, but I am curious to hear what you (and maybe others) were thinking and what the use case would be?

Typically I do not think that people prefer to make sprites on their phone, but I could be wrong. Is this a feature that other pixel-based editors offer? Curious :)

Kully avatar Sep 28 '24 21:09 Kully

@Viet281101 Re-pinging you on this?

@Viet281101 I was not planning on making it mobile-friendly, but I am curious to hear what you (and maybe others) were thinking and what the use case would be?

Typically I do not think that people prefer to make sprites on their phone, but I could be wrong. Is this a feature that other pixel-based editors offer? Curious :)

Did you have any thoughts here?

Kully avatar Feb 23 '25 23:02 Kully

Vision for the Copy to Clipboard button

  1. Array of Color References (personally what @kully will be using for his game engine hehe)
let colorPalette = [
    0: "#000000ff",
    1: "#ff0000ff",
    ...
]
let colorsArray = [
	4, 4, 5, 3, 3, 3, 4, 3,
	4, 3, 3, 3, 3, 3, 3, 3,
	4, 3, 4, 4, 3, 3, 3, 3,
	5, 3, 3, 4, 3, 5, 4, 4,
	3, 3, 3, 3, 3, 4, 4, 3,
	4, 5, 3, 3, 3, 3, 3, 3,
	3, 4, 3, 3, 3, 3, 4, 3,
	5, 3, 3, 3, 4, 4, 4, 4,
];
  1. All the colors in an array
let colorsArray = [
	#ff0000ff, #efe000ff", ...
];

Kully avatar Apr 15 '25 12:04 Kully

image

Project is revived again ... finding the time and inspiration has emerged! 💖

Came up with a potential flow for creating the colors ... next, editing color palettes. @Viet281101 @jkl3848 @Luca-Ilari @aleksi100

(NB Decided to pull back on the scope of this PR. That was part of the reason why progress was not being made as fast)

Kully avatar Apr 15 '25 13:04 Kully

Unfortunately, decided to close this PR since this branch has been out of sync for a while, and upon syncing with the master branch, there were a bunch of layout issues that arose.

Aiming to tackle some of the features in here more piece-meal.

Kully avatar Jun 24 '25 19:06 Kully