Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing Quake palette
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | [[Image:Qpalette.png|right|thumb|The Quake palette.]] | + | __NOTOC__[[Image:Qpalette.png|right|thumb|The Quake palette.]] |
− | |||
− | |||
− | |||
− | |||
− | |||
{|style="color:white;font-weight:bold;font-size:8pt;text-align:center;" cellspacing="0" cellpadding="2" | {|style="color:white;font-weight:bold;font-size:8pt;text-align:center;" cellspacing="0" cellpadding="2" | ||
|- | |- | ||
Line 297: | Line 292: | ||
|} | |} | ||
+ | Color 255 is transparent for sprites, 2d lmps, and gfx.wad entries (excluding [[conchars]], in which case it is black (color 0) that's made transparent). It is important that palette index 0 is black. The parameters for the [[color]] console command are the row #, but is restricted to rows 0 - 13. | ||
+ | It is important that the latter 8 palette rows are "backwards" (light-to-dark instead of dark-to-light). It appears that the [[id Software|ID]] artists did this for no good reason in the original Quake palette, and the engine programmers were forced to add a hack to accommodate it (along with the comment "the artists made some backwards ranges. sigh"). The only area this affects is player shirt/pants color translation (where one palette row must be mapped to another). | ||
=== palette.lmp === | === palette.lmp === | ||
− | The palette is stored in gfx/palette.lmp. It consists of 256 RGB values | + | The palette is stored in gfx/palette.lmp. It consists of 256 RGB values, coming out to 768 bytes in total. |
=== Download === | === Download === | ||
− | * [[Image:quake_palette.zip]] - The Quake palette in | + | * [[Image:quake_palette.zip]] - The Quake palette in 3 formats: JASC (text), Microsoft (RIFF), and raw (768-byte lump of RGB values). |
== Colormap == | == Colormap == | ||
Line 318: | Line 315: | ||
=== Generating the colormap === | === Generating the colormap === | ||
− | The following C code will generate a colormap.lmp that is nearly (but not exactly) identical to the Quake colormap. | + | The following C code will generate a colormap.lmp that is nearly (but not exactly) identical to the Quake colormap. Sorry about the lack of comments, maybe I'll add some later. Consider it public domain. |
/* sample a 24-bit RGB value to one of the colours on the existing 8-bit palette */ | /* sample a 24-bit RGB value to one of the colours on the existing 8-bit palette */ | ||
Line 380: | Line 377: | ||
== Legal status == | == Legal status == | ||
− | John Carmack officially put palette.lmp in the public domain | + | John Carmack officially put palette.lmp in the public domain to make Quake ports easier, so it is legal to, for example, embed it right into an engine executable. Colormap.lmp can also be considered public domain as it is trivially derived from the palette. |
+ | |||
+ | == Related Info == | ||
+ | * Most engine mods use 32-bit colour, so you need not worry about palettes. With 32-bit textures, shirt/pants colour changing and fullbrights are only possible if engines support a new implementation of them, for example [[DarkPlaces]]'s [[DP_GFX_EXTERNALTEXTURES]] extension, which allows additional _glow, _pants, _shirt, etc textures on top of the main one) |