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

Support additional palette formats #586

Open
warrengalyen opened this issue Dec 11, 2023 · 4 comments
Open

Support additional palette formats #586

warrengalyen opened this issue Dec 11, 2023 · 4 comments

Comments

@warrengalyen
Copy link
Contributor

warrengalyen commented Dec 11, 2023

I would like to volunteer myself to add the following palette format support:

  1. Adobe Photoshop Color Swatches (.aco) - READ/WRITE
    2. DeluxePaint (.lbm/.bbm) [yes, the old school bitmap graphics editor] - READ ADDED
    3. CorelDraw 3.0 (.pal) - READ and current CorelDraw (.xml) - READ/WRITE ADDED
  2. Microsoft RIFF (.pal) - READ/WRITE
@flabbet
Copy link
Member

flabbet commented Dec 11, 2023

Hey, thanks for volunteering! Sure, feel free to implement those. There might be one issue though, current system isn't prepared for multiple formats containing same extension, we already have implemented .pal format, which is JASC Palette format. You'll have to adjust parser resolver to handle this case. If you encounter any troubles, feel free join our Discord https://discord.gg/qSRMYmq for quick response

@warrengalyen
Copy link
Contributor Author

warrengalyen commented Dec 11, 2023

@flabbet Yeah, might have to adjust the import logic a bit for palettes. There are quite a few formats older formats out there use the .pal extension. I would suggest adding a simple function like CanReadFrom to the PaletteFileParser abstract class that does a quick byte check of the header.

In other news, I have .aco import/export working with conversion of all supported file color spaces (RGB, HSB, LAB, CMYK, Grayscale). I would also like to Adobe Swatch Exchange as well but not sure about the best user approach for this with the existing import structure.

@flabbet
Copy link
Member

flabbet commented Dec 12, 2023

CanReadFrom is a good idea. About .aco import/export. I feel like adjusting palettes system just for that format, so it supports multiple collections per palette is a bit too much. I suggest either flattening all colors into one palette or import all collections as a separate palettes into Palette Browser and then apply first one into current palette. I think that first solution is both easier to implement and more consistent. @Equbuxu what do you think?

@warrengalyen
Copy link
Contributor Author

@flabbet Importing all the colors to a single collection would definitely be the easiest since it wouldn't require modifying the import logic. I agree, modifying the palette system is really unnecessary for a single use case.

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