Convert r-g-b to pal for the x16

All aspects of programming on the Commander X16.
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

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

Post by funkheld »

Your report is very interesting.

Thanks.
greeting
hstubbs3
Posts: 72
Joined: Thu Oct 26, 2023 12:14 pm

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

Post 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
hstubbs3
Posts: 72
Joined: Thu Oct 26, 2023 12:14 pm

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

Post 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
Post Reply