Color Depth
Color depth determines how many colors can be displayed at a time.
4bpp
4bpp stands for 4 bits per pixel it is used to discuss 4-bit color depth. Using 4 bits per pixel (a nibble) allows for 16 'colors' (numbered 0 to 15) in the default palette. Each bit is used to control one component of the color.
From the most significant bit to the least significant bit, each one controls :
- intensity
- red
- green
- blue
For example, if you wanted to use a bright blue color you would use the number 1001b, or 9 in decimal. Here is a chart using the colors for this method.
| color name | intensity | red | green | blue | rgb | binary | decimal | hex |
|---|---|---|---|---|---|---|---|---|
| black | 0 | 0 | 0 | 0 | 0, 0, 0 | 0000 | 0 | #000000 |
| blue | 0 | 0 | 0 | 1 | 0, 0, 170 | 0001 | 1 | #0000AA |
| green | 0 | 0 | 1 | 0 | 0, 170, 0 | 0010 | 2 | #00AA00 |
| cyan | 0 | 0 | 1 | 1 | 0, 170, 170 | 0011 | 3 | #00AAAA |
| red | 0 | 1 | 0 | 0 | 170, 0, 0 | 0100 | 4 | #AA0000 |
| magenta | 0 | 1 | 0 | 1 | 170, 0, 170 | 0101 | 5 | #AA00AA |
| brown | 0 | 1 | 1 | 0 | 170, 85, 0 | 0110 | 6 | #AA5500 |
| gray | 0 | 1 | 1 | 1 | 170, 170, 170 | 0111 | 7 | #AAAAAA |
| dark gray | 1 | 0 | 0 | 0 | 85, 85, 85 | 1000 | 8 | #555555 |
| bright blue | 1 | 0 | 0 | 1 | 85, 85, 255 | 1001 | 9 | #5555FF |
| bright green | 1 | 0 | 1 | 0 | 85, 255, 85 | 1010 | 10 | #55FF55 |
| bright cyan | 1 | 0 | 1 | 1 | 85, 255, 255 | 1011 | 11 | #55FFFF |
| bright red | 1 | 1 | 0 | 0 | 255, 85, 85 | 1100 | 12 | #FF5555 |
| pink / bright magenta | 1 | 1 | 0 | 1 | 255, 85, 255 | 1101 | 13 | #FF55FF |
| yellow | 1 | 1 | 1 | 0 | 255, 255, 85 | 1101 | 14 | #FFFF55 |
| white | 1 | 1 | 1 | 1 | 255, 255, 255 | 1111 | 15 | #FFFFFF |
8bpp
8bpp is an abbreviation for 8 bits per pixel and is used to discuss an 8-bit color depth.
Since 8 bits are one byte, 8bpp color depth can have a maximum of 256 colors.
16bpp
16bpp stands for 16 bits per pixel.
Related Pages
| Categories: Color : Computer Science : Graphics |
page_revision: 7, last_edited: 1238157006|%e %b %Y, %H:%M %Z (%O ago)