How Pixels Store Color

Every pixel in a 24-bit image is defined by three color channels: Red, Green, and Blue. Each channel stores a value from 0 to 255, represented as 8 binary bits. That means each pixel carries 24 bits (3 bytes) of data. Adjust the sliders below to see how binary values map to visible color.

Red182
Green126
Blue201
Key concept: The last bit of each byte (the LSB) contributes the least to the visible color — changing it shifts the value by just 1 out of 256. This is what steganography exploits: replacing those least significant bits with secret data produces a color change imperceptible to the human eye.

Can You See the Difference?

Below are two color swatches — one is the original pixel, the other has its three least significant bits modified (one per channel). Click Randomize to try different colors. Can you ever tell which is which?

Original Pixel

Modified Pixel (LSBs Changed)

Forensic implication: If changing 3 bits per pixel is invisible, a 1920×1080 image has 2,073,600 pixels × 3 channels × 1 LSB = ~6.2 million bits = ~777 KB of hidden capacity in a single photograph. That is enough to conceal entire documents, archives, or executables.

Embedding a Secret Message

Type a short message below. You will see it converted to binary, then embedded one bit at a time into the LSBs of a row of pixels. Hover over any pixel to see its RGB values and which bit of your message it carries.

6 / 16 characters — 48 bits — requires 16 pixels
Modified pixel (LSB changed) Unmodified pixel
What happened: Each character of your message was converted to 8 bits (ASCII). Those bits were distributed across the Red, Green, and Blue LSBs of successive pixels — 3 secret bits per pixel. The original colors barely changed, but your message is now embedded in the image data.

Hiding Capacity Calculator

Enter an image's dimensions to calculate how much secret data can be hidden using 1-bit LSB substitution across all three RGB channels.

Context: A typical Word document is 20–50 KB. A compressed ZIP archive of source code might be 200 KB. At 777 KB capacity, a single 1080p photograph can conceal multiple documents with room to spare — and the image looks identical to the original.