please run this in turbowarp at turbowarp.org/673723638?turbo So this is a NPR that converts a 320x200 image to petscii and a prg export in hex that you can run on an actual C64!
color distance function by @MartinBraendli Instructions on how to import an image: 1. go to annoyedart1256.github.io/image2hex_320x200 , import an image, and copy the output from the textbox. 2. press i in the scratch project 3. paste in the hex image! Instructions on how to export a petscii image to prg export using this project: 1. import an image or use the default one 2. Set the exposure to fit the image. 3. press the green flag and wait until the preview has finished 4. copy the text in the "_prg in hex_" list 5. go to http://tomeko.net/online_tools/hex_to_file.php?lang=en and paste in the prg output into the hex string 6. set the filename to however you want but SET THE FILE FORMAT TO PRG like this: NPR_petscii.prg 7. click on "Convert" and run the downloaded file in an emulator or even on real hardware if you can load prgs on it!