I made a palette of all the colors on this image:
This will allow you to have GIMP do some dithering on images that use more than the uzebox's 256 colors.
To install:
Download Uzebox.hex
Change the filename to Uzebox.gpl
Goto your GIMP directory.
Copy it to ./share/gimp/2.0/palettes
To Use it:
In gimp goto image>Mode>Indexed
Check "Use custom palette"
Select "Uzebox"
Select Dithering Method
Click Convert
>J
GIMP Palette for the Uzebox
GIMP Palette for the Uzebox
- Attachments
-
- Uzebox.hex
- (5.29 KiB) Downloaded 965 times
Lerc wrote:I intend to use my powerful skills of procrastination to ensure that when I get to making things, the chips will be available.
Re: GIMP Palette for the Uzebox
Thanks for doing the palette. I've been using Tile Studio up to now but I'll give Gimp a go now.
-
- Posts: 2
- Joined: Mon May 24, 2010 5:16 pm
Re: GIMP Palette for the Uzebox
Hello,
I have just discovered uzebox and probably won't be able to give it a try but I find it interesting as a platform to create art for. I'm also GIMP user and creating the uzebox palette was the first thing that came to my mind.
I read that uzebox uses rgb332 color space for its palette and I have trouble to find corresponding colors in rgb888 and vice versa because there are various ways to do that. So I searched through the website and wiki and found two images that claim to be uzebox palette.
http://belogic.com/uzebox/images/color_table.gif
http://uzebox.org/wiki/images/thumb/0/0 ... _table.png
First thing I noticed on the GIF version is that it only contains 240 colors, not 256 like the PNG from the wiki. I made my palette using the PNG version and found this thread while reading Hello World introduction. I decided to compare the two palettes and noticed that the palette from this thread uses only 238 colors total and numbers in R, G and B channels vary a lot while numbers in the source PNG image follow this simple formula.
For Red and Green channel:
channel_in_rgb888 = round((255/7)*channel_in_rgb332)
that means red and green channel should contain only numbers like 36, 73, 109, 146, 182, 219 and 255.
For Blue channel:
channel_in_rgb888 = round((255/3)*channel_in_rgb332)
that is 85, 170 and 255.
I also looked into source images in demos directory of the Subversion repository and it confused me even more. Megatris more or less follows that idea except it uses 72 instead of 73 while SuperMarioDemo is completely off. I am not able to understand the code of the convertor utility and therefore I am asking on the forums.
Thanks in advance for your help,
Green Hell
P.S. I'm sending my palette in the attachment.
I have just discovered uzebox and probably won't be able to give it a try but I find it interesting as a platform to create art for. I'm also GIMP user and creating the uzebox palette was the first thing that came to my mind.
I read that uzebox uses rgb332 color space for its palette and I have trouble to find corresponding colors in rgb888 and vice versa because there are various ways to do that. So I searched through the website and wiki and found two images that claim to be uzebox palette.
http://belogic.com/uzebox/images/color_table.gif
http://uzebox.org/wiki/images/thumb/0/0 ... _table.png
First thing I noticed on the GIF version is that it only contains 240 colors, not 256 like the PNG from the wiki. I made my palette using the PNG version and found this thread while reading Hello World introduction. I decided to compare the two palettes and noticed that the palette from this thread uses only 238 colors total and numbers in R, G and B channels vary a lot while numbers in the source PNG image follow this simple formula.
For Red and Green channel:
channel_in_rgb888 = round((255/7)*channel_in_rgb332)
that means red and green channel should contain only numbers like 36, 73, 109, 146, 182, 219 and 255.
For Blue channel:
channel_in_rgb888 = round((255/3)*channel_in_rgb332)
that is 85, 170 and 255.
I also looked into source images in demos directory of the Subversion repository and it confused me even more. Megatris more or less follows that idea except it uses 72 instead of 73 while SuperMarioDemo is completely off. I am not able to understand the code of the convertor utility and therefore I am asking on the forums.
Thanks in advance for your help,
Green Hell
P.S. I'm sending my palette in the attachment.
- Attachments
-
- uzebox_wiki.hex
- (3.83 KiB) Downloaded 697 times
Re: GIMP Palette for the Uzebox
I never noticed the Gif of the palette didn't have the right number of colors! My best guess is that Photoshop did a color reduction before writing the file. The complete palette is described in this Photoshop palette file: http://code.google.com/p/uzebox/source/ ... uzebox.act. It is simply an array of 256 palette entries each composed of 3x8-bit channels (R,G&B).
Here's the code used to generate it (from the Java tools):
Now note that this will generate exact color for the "old" R-2R video DAC (revision D1 and earlier). The latest one uses a weighted DAC and the blue component is not using the same formula/design (to yield better whites). I beleive Clay Cowgill used something like:
I think the exact formula is somewhere on the forums, do a search for DAC* .
I didn't bother to make another palette file yet since, quite frankly, there's isn't much visible difference with the old DAC anyways (IHMO).
Hope that helps,
-Uze
Here's the code used to generate it (from the Java tools):
Code: Select all
int col=0;
int palIndex=0;
byte[] pal=new byte[(256*3)];
for(int i=0;i<256;i++){
pal[palIndex] = (byte)((((col>>0) & 7) * 255 /7)) ; //red
pal[palIndex+1]= (byte)((((col>>3) & 7) * 255 /7)) ; //green
pal[palIndex+2]= (byte)((((col>>6) & 3) * 255 /3)) ; //blue
palIndex+=3;
col++;
}
Code: Select all
pal[palIndex+2]= (byte)(((((col>>6) & 3) * 255 /7)))>>1 ; //blue
I didn't bother to make another palette file yet since, quite frankly, there's isn't much visible difference with the old DAC anyways (IHMO).
Hope that helps,
-Uze
-
- Posts: 2
- Joined: Mon May 24, 2010 5:16 pm
Re: GIMP Palette for the Uzebox
Well, Thanks a lot. I was able to re-implement your algorithm to generate palette automatically.
Here's my results:
Also fixed GIMP palette with all 256 colors and all identical to the Uze's original:
Here's my results:
Also fixed GIMP palette with all 256 colors and all identical to the Uze's original:
- Attachments
-
- uzebox_algorithmic.hex
- (3.83 KiB) Downloaded 1254 times