Page 5 of 5

Re: Convert r-g-b to pal for the x16

Posted: Thu Mar 21, 2024 9:56 pm
by funkheld
Your report is very interesting.

Thanks.
greeting

Re: Convert r-g-b to pal for the x16

Posted: Sat Mar 23, 2024 7:19 pm
by hstubbs3
I really need to stop playing with this and move onto other stuff..
so will stick there here in case anyone else really wants to do this stuff so manually..

currently this does not do 1 or 2 bit or work from previously loaded palette .. but for a quick one-off to try to make an optimal 256 color or 16 color palette and map an image to it..

one could write the 16 color palette to a different address ( 1:$FA00 + offset*32) and then set offset rather than having it take over the first 16 colors .. but is just example

https://github.com/hstubbs3/CommanderX1 ... bin_pal.py

python3 png_to_bin_pal.py stockvault-path-in-nature124348.png NATURE.BIN -g NATUREPAL.BIN

SCREEN #80
BVLOAD "NATUREPAL.BIN",8,1,$FA00
BVLOAD "NATURE.BIN",8,0,$0000

Image

python3 png_to_bin_pal.py stockvault-path-in-nature124348.png NATURE16.BIN 16 -g NATUREPAL16.BIN

switch to 16 color ->
POKE $9F2D,$6
BVLOAD "NATUREPAL16.BIN",8,1,$FA00
BVLOAD "NATURE16.BIN,8,0,$0000

Image

Re: Convert r-g-b to pal for the x16

Posted: Sat Mar 23, 2024 7:42 pm
by hstubbs3
dang it I posted and then realized why the 16 color version was so bad..
Image

the 256 color version is probably a lil better too but couldn't really tell.. other than the palette being darker in the first 15 colors so the text isn't white here..

Image