16 BIT Embedded Color Utility

RGB565 Color Converter

Convert 24-bit RGB888 and HTML hexadecimal colors into 16-bit RGB565 values, or decode RGB565 back into displayable RGB888. View individual red, green and blue bit fields, binary representation and big-endian or little-endian bytes.

✓ RGB888 → RGB565 ✓ RGB565 → RGB888 ✓ Hex Color ✓ 16-Bit Binary ✓ Byte Order ✓ Color Preview
565
RGB Color Conversion
● Ready
Accepted: hexadecimal such as 0xF800 or F800, decimal such as 63488, or a 16-bit binary value.
RGB565 layout: bits 15–11 store 5 red bits, bits 10–5 store 6 green bits and bits 4–0 store 5 blue bits. This produces 65,536 possible 16-bit color values.
RGB565 Conversion Result Converted
Converted Color
RGB565 Hex
RGB565 Decimal
RGB565 Binary
RGB888 Hex
RGB888 Decimal
Red 5-Bit
Green 6-Bit
Blue 5-Bit
Big-Endian Bytes
Little-Endian Bytes
Red Binary
Green Binary
Blue Binary
RGB888 Packed
Color Depth 16 bits / pixel
Total Colors 65,536
Conversion Breakdown

What Is RGB565?

RGB565 is a 16-bit packed color format commonly used by embedded displays, framebuffers, microcontrollers and graphics interfaces where memory and bus bandwidth are more limited than on desktop systems.

The 16 bits are divided into 5 bits for red, 6 bits for green and 5 bits for blue. Green receives one additional bit because human vision is relatively sensitive to variations in green intensity.

RGB565 Bit Layout

15 11 10 5 4 0 +-----------------+--------------------+------------------+ | RED 5 | GREEN 6 | BLUE 5 | +-----------------+--------------------+------------------+ Bits: RRRRR GGGGGG BBBBB

RGB888 to RGB565 Formula

An RGB888 color provides 8 bits for each channel. To store the color in RGB565, red and blue must be reduced from 8 bits to 5 bits while green is reduced from 8 bits to 6 bits.

R5 = R8 >> 3 G6 = G8 >> 2 B5 = B8 >> 3 RGB565 = (R5 << 11) | (G6 << 5) | B5

RGB565 to RGB888 Formula

To decode RGB565, first extract the three packed bit fields:

R5 = (RGB565 >> 11) & 0x1F G6 = (RGB565 >> 5) & 0x3F B5 = RGB565 & 0x1F

The calculator then expands the limited-width channels back to 8-bit RGB using bit replication.

R8 = (R5 << 3) | (R5 >> 2) G8 = (G6 << 2) | (G6 >> 4) B8 = (B5 << 3) | (B5 >> 2)

RGB565 Red

RGB888: #FF0000 R5 = 31 G6 = 0 B5 = 0 RGB565: 31 << 11 = 0xF800

Therefore pure red is normally represented as 0xF800 in RGB565.

RGB565 Green

RGB888: #00FF00 R5 = 0 G6 = 63 B5 = 0 RGB565: 0x07E0

RGB565 Blue

RGB888: #0000FF R5 = 0 G6 = 0 B5 = 31 RGB565: 0x001F

Common RGB565 Color Values

Color RGB888 RGB565 Binary Fields
Black #000000 0x0000 00000 000000 00000
White #FFFFFF 0xFFFF 11111 111111 11111
Red #FF0000 0xF800 11111 000000 00000
Green #00FF00 0x07E0 00000 111111 00000
Blue #0000FF 0x001F 00000 000000 11111
Yellow #FFFF00 0xFFE0 11111 111111 00000
Cyan #00FFFF 0x07FF 00000 111111 11111
Magenta #FF00FF 0xF81F 11111 000000 11111

Why RGB565 Has 65,536 Colors

RGB565 contains exactly 16 bits per pixel. Sixteen binary bits provide 216 possible bit patterns.

2^16 = 65,536 possible RGB565 values

RGB565 Color Resolution

The 5-bit red and blue fields each provide 32 discrete levels. The 6-bit green field provides 64 levels.

Red: 2^5 = 32 levels Green: 2^6 = 64 levels Blue: 2^5 = 32 levels 32 × 64 × 32 = 65,536 colors

Why RGB888 and RGB565 May Not Match Exactly

Converting RGB888 to RGB565 discards some color precision because each 8-bit channel is reduced to five or six bits. Converting the value back to RGB888 therefore usually gives an approximation of the original color.

Colors whose components map exactly to the available RGB565 levels can round trip without visible numerical difference, while other values are quantized.

RGB565 Big-Endian and Little-Endian Bytes

RGB565 is a 16-bit number, but a device may transmit or store its two bytes in different orders.

RGB565: 0xF800 High byte: F8 Low byte: 00 Big-endian: F8 00 Little-endian: 00 F8

Byte order does not change the logical RGB565 value. It changes how its bytes appear in memory or on a communication interface.

RGB565 on TFT and LCD Displays

RGB565 is widely used by embedded TFT and LCD controllers because it requires only two bytes per pixel. Compared with 24-bit RGB888, it reduces framebuffer size and transfer bandwidth by one third.

320 × 240 framebuffer RGB565: 320 × 240 × 2 = 153,600 bytes RGB888: 320 × 240 × 3 = 230,400 bytes

RGB565 vs RGB555

RGB555 allocates five bits to every color channel and typically leaves one additional bit unused or uses it for another purpose. RGB565 instead gives green six bits and uses all 16 bits for color.

RGB565 vs RGB888

RGB888 provides eight bits per red, green and blue channel for a total of 24 bits per pixel and more than 16 million possible colors. RGB565 uses 16 bits per pixel and therefore requires less storage and bandwidth but has lower color precision.

RGB565 Color Converter FAQs

What is RGB565?
RGB565 is a 16-bit color format with 5 red bits, 6 green bits and 5 blue bits.
How do I convert RGB888 to RGB565?
Reduce red and blue to 5 bits, reduce green to 6 bits, then pack the fields as R5<<11, G6<<5 and B5.
What is red in RGB565?
Pure RGB red #FF0000 converts to RGB565 0xF800.
What is green in RGB565?
Pure green #00FF00 converts to 0x07E0.
What is blue in RGB565?
Pure blue #0000FF converts to 0x001F.
What is white in RGB565?
White is 0xFFFF because all red, green and blue bits are set.
What is black in RGB565?
Black is 0x0000.
How many colors does RGB565 support?
It has 65,536 possible 16-bit values.
Why is green 6 bits in RGB565?
The extra bit gives green greater precision, which is useful because human vision is particularly sensitive to luminance variations associated with green.
Why do some displays require swapped RGB565 bytes?
The logical RGB565 value is 16 bits, but hardware interfaces can transfer the high and low bytes in different orders. Always check the display-controller and MCU byte-order requirements.

Convert RGB888, Hex and RGB565 Colors

Encode full RGB colors into compact 16-bit RGB565 values or decode RGB565 numbers back into RGB888 while inspecting channel fields, binary bits and memory byte order.

Scroll to Top