![]() Registered Member ![]()
|
A few years ago, when I was playing around with Pillow(Python Lib), I was experimenting with palettes as any application does when coming across the fact if you want to support them or not.
I ended up looking at a few different open formats, but ended up writing some code that would just read an image(.png) at the pixel level. The basic specs where that every pixel in the image would be a color for the palette "widget", width of the image would be the column length, and would have the possibility of having an easily accessible alpha value to boot(RGBA). The limitation of doing it this way was that I couldn't encode "color names", but I could represent them in any tooltip format that I wanted(RGB, Hex, CSS, etc...) and they would be easy to import and export in the same format. If 0,0,0,0.0 or pure alpha was present in the pixel, it would be ignored for the row/col. I also noticed that an optimized png is smaller in file size normally than a simple text file. The name of the .png would be the palette set name. Most palette png files would be around 16x16px roughly or follow a rows/cols dimension. Also with having image data, I could theoretically limit a palette to so many desired colors by similarity/comparison/etc. Could something like this be a desired exchange format for krita? or support for even as simple a concept? |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]