Colors: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
(Color depth examples)
Line 1: Line 1:
[[File:Pal perfect.png|thumb|All 65536 (2^16) possible NeoGeo colors.]]
[[File:Pal perfect.png|thumb|All 65536 (2^16) possible NeoGeo colors.]]


D
Each color component (red, green or blue) on the NeoGeo is coded with '''6 bits with 1 common bit''' (dark bit), effectively making full use of the 16 color definition bits (65536 colors palette).
<span style="color:red;">R0</span>
 
<span style="color:green;">G0</span>
=Format=
<span style="color:blue;">B0</span>
 
<span style="color:red;">R4 R3 R2 R1</span>
A color word is composed in the following manner:
<span style="color:green;">G4 G3 G2 G1</span>
<span style="color:blue;">B4 B3 B2 B1</span>


{{Template:16BitRegister|[[Video DAC|Dark bit]]|1|R0|1|G0|1|B0|1|R4|1|R3|1|R2|1|R1|1|G4|1|G3|1|G2|1|G1|1|B4|1|B3|1|B2|1|B1|1|}}
{{Template:16BitRegister|[[Video DAC|Dark bit]]|1|R0|1|G0|1|B0|1|R4|1|R3|1|R2|1|R1|1|G4|1|G3|1|G2|1|G1|1|B4|1|B3|1|B2|1|B1|1|}}


Each color component is coded with 6 bits, with 1 common LSB (dark bit), effectively making full use of the 16 color definition bits.
Which can also be seen in a simpler way:
 
{{Template:16BitRegister|LSBs|4|Red MSBs|4|Green MSBs|4|Blue MSBs|4}}
 
With:
* <span style="color:red;">Red</span>: R4~0
* <span style="color:green;">Green</span>: G4~0
* <span style="color:blue;">Blue</span>: B4~0
* The dark bit, used as a common LSB for the 3 components
 
The upper 4 bits of each component fit in 3 nibbles, making it easy to write or guess color values ($0F00 is red, $00F0 is green...).
 
=Color depth=
 
The NeoGeo's 16 bit color depth [[Comparison_with_other_systems|is close]] to the 15 bit depths of the SNES, GBA and Saturn consoles.


The upper 4 bits of each component fits in 3 nibbles, making it easy to write or guess color values ($0F00 is red, $00F0, is green...).
<gallery widths=240 heights=192>
File:Hsv_full.png|Full 24 bit HSV gradient
File:Hsv_neogeo.png|Full NeoGeo gradient (16 bit)
File:Hsv_neogeo_nodak.png|Without using the dark bit (like some image converters)
File:Hsv_neogeo_4bit.png|Without using the whole upper nibble (12 bit)
</gallery>


=Converter=
=Converter=

Revision as of 02:14, 15 March 2017

All 65536 (2^16) possible NeoGeo colors.

Each color component (red, green or blue) on the NeoGeo is coded with 6 bits with 1 common bit (dark bit), effectively making full use of the 16 color definition bits (65536 colors palette).

Format

A color word is composed in the following manner:

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Def Dark bit R0G0B0R4R3R2R1G4G3G2G1B4B3B2B1

Which can also be seen in a simpler way:

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Def LSBs Red MSBsGreen MSBsBlue MSBs

With:

  • Red: R4~0
  • Green: G4~0
  • Blue: B4~0
  • The dark bit, used as a common LSB for the 3 components

The upper 4 bits of each component fit in 3 nibbles, making it easy to write or guess color values ($0F00 is red, $00F0 is green...).

Color depth

The NeoGeo's 16 bit color depth is close to the 15 bit depths of the SNES, GBA and Saturn consoles.

Converter

Enter 24 bit RGB values to get the NeoGeo color word.