Page 1 of 3

FINISHED LABELED VERA PALLETTE

Posted: Tue May 30, 2023 3:15 am
by ahenry3068
Projects always get us off on Tangents. I'm working on a version of the VERA colorpallette.png file
with each block labeled with its Hexadecimal number. I'm using GIMP to do it.
Tonight I didn't even finish the first row. Got to $0A. When I finish it I'll post it in Programming or maybe
elsewhere. I also want to incorporate it onto the TOP of my X16 case when I do that project.

Ok. I pursued this a little further. Low res version
VERASCRN.png
VERASCRN.png (18.07 KiB) Viewed 5856 times
This is special because I did it in CBM Basic right on the emulator with this code

Code: Select all

10 SCREEN $80 
15 C = 0
20 FOR Y = 0 TO 225 STEP 15
30     FOR X = 0 TO 300 STEP 20
40         RECT X, Y, X+19, Y + 14, C
45         TC = 1
REM FIRST ITERATION JUST DID ALL THE TEXT IN WHITE
REM THESE 6 LINES OF IF STATEMENTS  WERE VERY EXPENSIVE IN CODE SPEED.
REM THE GOAL OF THIS CODE WAS A USEFUL REFERENCE GRAPHIC SO
REM THE SPEED WASN'T SO IMPORTANT AND IT MOVED IT FROM < 1 SEC TO 
REM MAYBE CLOSE TO 2 SECONDS BUT DEFINITELY NOTICEABLE
REM I NEED TO REMEMBER THIS IF I RUN INTO ANYTHING SPEED CONSTRAINED
REM THESE IF STATEMENTS FLIP THE TEXT COLOR FOR CHAR TO BLACK
REM WHEN THE WHITE COLOR WOULD HAVE POOR CONTRAST WITH THE SELECTED
REM COLOR
50         IF C=$01 OR C=$1D OR C=$1E OR C=$1F OR C=$26 OR C=$41 THEN TC=$10 
55         IF C=$42 OR C=$49 OR C=$50 OR C=$5D OR C=$5E OR C=$65 THEN TC=$10
60         IF C=$6B OR C=$6C OR C=$73 OR C=$79 OR C=$7A OR C=$81 THEN TC=$10
65         IF C=$88 OR C=$8F OR C=$95 OR C=$96 OR C=$9D OR C=$A4 THEN TC=$10
70         IF C=$03 OR C=$07 OR C=$0D OR C=$AB OR C=$B2 OR C=$CE THEN TC=$10
75         IF C=$B1 OR C=$B9 OR C=$EA OR C=$F1 OR C=$F8 OR C=$CE THEN TC=$10
85         CHAR X+4,Y+9,TC,HEX$(C)
90         C = C + 1
95     NEXT X
100 NEXT Y

REM LINE NUMBER IS 8000 BECAUSE I CUT RIGHT FROM MY CRAPS PROGRAM 
REM I DONT USE GET OFTEN
8000 GET X$:IF X$<>"" THEN GOTO 8000 : REM FLUSH KEYBOARD BUFFER
8010 GET X$:IF X$="" THEN GOTO 8010 : REM WAIT FOR KEY 
8020 SCREEN 0
TOKENIZED BASIC FOR DOWNLOAD AND USE ON "HARDWARE"
VERA.PRG
(636 Bytes) Downloaded 542 times
FINISHED (In the Hi-Res version I took the PNG from the docs and labeled it using text layers in GIMP)
cx16palettelabel.png
cx16palettelabel.png (267.08 KiB) Viewed 5886 times
VERASCRN.png
VERASCRN.png (18.07 KiB) Viewed 5856 times

A tiny bit more progress

Posted: Thu Jun 01, 2023 1:54 am
by ahenry3068
I am going to finish this. . It is damn tedious. Finished through $14. Still over 200 blocks left to label. At this rate
Its going to take a month... This will be damn useful for anyone programming using the VERA's default Pallette.

Re: LABELED VERA PALLETTE

Posted: Thu Jun 01, 2023 1:55 am
by ahenry3068
Its also going to look kind of cool behind a transparent Window somewhere on the top
of my X16 case

ALERT FOR INFO.

Posted: Thu Jun 01, 2023 2:13 am
by ahenry3068
Oh damn.. Does anyone have the R.G.B values for the VERA color Pallette... I just
had an epiphany. I could write a QB64 program to replicate this chart very easily
if I had those. And I could label each block.. I don't even have to save the file.
Just draw it in a Window and do a screen Capture. It might take me a couple
hours to write the code but it's going to take days or weeks to do this in GIMP.

URGENT REQUEST FOR INFO

Posted: Thu Jun 01, 2023 2:22 am
by ahenry3068
Even if it takes a Day or 2 to write the code it will be a speedup. I expect that once
I write the code the render will be at most a few seconds.

Re: ALERT FOR INFO.

Posted: Thu Jun 01, 2023 5:47 pm
by kelli217
ahenry3068 wrote: Thu Jun 01, 2023 2:13 am Oh damn.. Does anyone have the R.G.B values for the VERA color Pallette... I just
had an epiphany. I could write a QB64 program to replicate this chart very easily
if I had those. And I could label each block.. I don't even have to save the file.
Just draw it in a Window and do a screen Capture. It might take me a couple
hours to write the code but it's going to take days or weeks to do this in GIMP.
The default values are in the documentation... or rather, they were, but they’ve since been replaced with a visual reference that isn't labeled.

If you poke around in the history, you can find the old values that were listed there. But rather than make you do that, I'll just copy and paste them here:

	000,fff,800,afe,c4c,0c5,00a,ee7,d85,640,f77,333,777,af6,08f,bbb
	000,111,222,333,444,555,666,777,888,999,aaa,bbb,ccc,ddd,eee,fff
	211,433,644,866,a88,c99,fbb,211,422,633,844,a55,c66,f77,200,411
	611,822,a22,c33,f33,200,400,600,800,a00,c00,f00,221,443,664,886
	aa8,cc9,feb,211,432,653,874,a95,cb6,fd7,210,431,651,862,a82,ca3
	fc3,210,430,640,860,a80,c90,fb0,121,343,564,786,9a8,bc9,dfb,121
	342,463,684,8a5,9c6,bf7,120,241,461,582,6a2,8c3,9f3,120,240,360
	480,5a0,6c0,7f0,121,343,465,686,8a8,9ca,bfc,121,242,364,485,5a6
	6c8,7f9,020,141,162,283,2a4,3c5,3f6,020,041,061,082,0a2,0c3,0f3
	122,344,466,688,8aa,9cc,bff,122,244,366,488,5aa,6cc,7ff,022,144
	166,288,2aa,3cc,3ff,022,044,066,088,0aa,0cc,0ff,112,334,456,668
	88a,9ac,bcf,112,224,346,458,56a,68c,79f,002,114,126,238,24a,35c
	36f,002,014,016,028,02a,03c,03f,112,334,546,768,98a,b9c,dbf,112
	324,436,648,85a,96c,b7f,102,214,416,528,62a,83c,93f,102,204,306
	408,50a,60c,70f,212,434,646,868,a8a,c9c,fbe,211,423,635,847,a59
	c6b,f7d,201,413,615,826,a28,c3a,f3c,201,403,604,806,a08,c09,f0b

Re: LABELED VERA PALLETTE

Posted: Thu Jun 01, 2023 6:22 pm
by DragWx
For future reference, the exact palette in the VERA can be found in its source code: palette_ram.mem.

Re: LABELED VERA PALLETTE

Posted: Thu Jun 01, 2023 10:03 pm
by ahenry3068
I was hoping for 24 bit values :( . Am I correct in assuming those are 16 bit RGB values ? 5 bits per R,G,B value. Is the 16th bit
intensity or just insignificant ??? (This may be moot. I'm getting along a little faster in GIMP as I get used to it....lol)

Re: LABELED VERA PALLETTE

Posted: Thu Jun 01, 2023 10:05 pm
by ahenry3068
Or is it 12 bit psuedo-true color ? 4 bits per RGB value ? That actually might be easier to convert
to the 24 bit value I need in QB64

Re: LABELED VERA PALLETTE

Posted: Thu Jun 01, 2023 10:58 pm
by Guybrush
Those are also valid html colors, just duplicate each hex digit e.g. #afe --> #aaffee. In fact, instead of an image, you could create an self-contained html file which uses some javascript to generate the table with correct colors and labels. Or you could use a regex find-replace in a text editor to generate the same html.
If you really want an image file, just make a screenshot of said html, crop it and you're done.