Colored Squares Cipher
Map hex colors to alphabet letters. Encode messages as visual color blocks, decode color sequences back to text.
How the Colored Squares Cipher Works
This visual cipher replaces each letter of the alphabet with a specific color. The encoded message becomes a row of colored squares — visually appealing and impossible to read without the color key. The default mapping uses a carefully chosen palette of 26 distinct colors, one per letter. Spaces in the original text appear as thin gaps between groups of squares.
The cipher is inspired by color-based steganography and visual cryptography. While it is not mathematically secure, it serves as an excellent educational tool for exploring substitution ciphers, and creates beautiful visual outputs that work well for puzzles, games, and art projects.
Visual Cryptography and Color Codes
Visual cryptography is a branch of cryptography where secrets are encoded in visual elements — images, patterns, colors, or spatial arrangements — rather than purely mathematical operations. Color-based encoding has been used in various forms throughout history, from colored lanterns used as signals to modern QR codes where color variations encode data. This tool uses hex color codes — the standard 6-digit RGB representation used in web design and digital art — as the encoding alphabet.
The Default Color Palette
The 26 colors in the default map are chosen to be visually distinct from one another, making manual decoding possible if you memorize key colors. High-frequency letters like E, T, A get bold distinctive colors. The full palette is visible in the Custom Map tab. The colors are drawn from a rainbow-spread selection that ensures no two adjacent letters look similar.
Custom Color Maps
Switch to the Custom Map tab to define your own letter-to-color mapping as a JSON object. This makes the cipher significantly harder to decode without the key — since the color sequence itself gives no information about the underlying mapping. Share only the key with your intended recipient. You can use any valid hex color, including dark and light shades, pastels, and neons.
Applications
- Escape rooms — hide a code word in a grid of colored squares
- Educational cryptography — teach substitution ciphers visually
- Art and design — generate color sequences from text for design inspiration
- Puzzle books — create color-coded puzzle challenges