Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add something like loadPalette() which loads .gpl #622

Open
amyspark-ng opened this issue Mar 3, 2025 · 1 comment
Open

feat: Add something like loadPalette() which loads .gpl #622

amyspark-ng opened this issue Mar 3, 2025 · 1 comment

Comments

@amyspark-ng
Copy link
Collaborator

amyspark-ng commented Mar 3, 2025

Suggedted by @lajbel, please elaborate 😔

Wrote by @lajbel:

loadPalette("mulfok32", "./palettes/mulfok32.gpl");

const mulfok = getPalette("mulfok32");

mulfok[0]; // the first element in the palette

// how mulfok would like
mulfok = [
    new Color(...),
    new Color(...),
]

This could be cool for users loading a palette and the colors objects being created once.
We use .gpl files like Aseprite

@amyspark-ng amyspark-ng added the enhancement New feature or request label Mar 3, 2025
@lajbel lajbel removed the enhancement New feature or request label Mar 3, 2025
@dragoncoder047
Copy link
Contributor

This might go nice with a palletize shader that gets a uniform vec4 u_palette[PALLETE_SIZE]; and then makes it the closest color, for stuff that has like continuous colors gradients. it would get banding but if the goal is the palette then well, priorities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants