Skip to content

Support custom palette for images #37

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

Open
orsinium opened this issue Jan 2, 2025 · 2 comments
Open

Support custom palette for images #37

orsinium opened this issue Jan 2, 2025 · 2 comments

Comments

@orsinium
Copy link
Member

orsinium commented Jan 2, 2025

Apps may use a custom color palette. We should make it possible to draw images with a custom palette. See uses of DEFAULT_PALETTE in images.rs, we should let users to overwrite it in the config. Both in general for the project and only for specific assets.

@BjoernSchilberg
Copy link

That would be great. I got stranded here because I wanted to reimplement my old Go Raylib project [1] for firefly. But this one uses the Sprout Land Asset Pack [2], which uses a different color scheme than Sweetie 16.

[1] https://github.com/BjoernSchilberg/go-sproutlings
[2] https://cupnooble.itch.io/sprout-lands-asset-pack

@orsinium
Copy link
Member Author

You can draw images in the default palette and then replace colors in runtime using set_palette. It's less convenient to draw that way (colors you see in the image editor aren't the same as you'll see in the game) but for now gets the job done.

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

No branches or pull requests

2 participants