{
  "id": 2411290,
  "title": "I Built a QR-Inspired Code That Uses 4 Colors, Stores More Data, and Supports Encryption",
  "url": "https://urgent.news/2026/08/21/i-built-a-qr-inspired-code-that-uses-4-colors-stores-more-data-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-21T17:51:20.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/akanshsirohi/i-built-a-qr-inspired-code-that-uses-4-colors-stores-more-data-and-supports-encryption-195d"
  },
  "original_language": "en",
  "account": "QR codes have become ubiquitous in various applications, ranging from payments to Wi-Fi sharing. They are standardized, optimized, and resilient, but the original design only uses two visible states, black and white. The author wondered why only binary states are used when cameras can differentiate millions of colors. This curiosity led to the creation of QuadQR, an experimental open-source 2D matrix code that utilizes red, green, blue, and white as its four data states.\n\nQuadQR is designed to pack more information into each data cell by using four distinguishable visual states instead of two. Traditional QR data modules represent data using binary, where black denotes one state and white another, representing one binary choice per module. Modern technology, however, is far more capable than when QR codes were first developed. Therefore, the author conducted an experiment: what happens when a QR-inspired matrix code uses four reliably distinguishable visual states instead of two? This became QuadQR.\n\nQuadQR uses Red, Green, Blue, and White as its data states, with each data cell carrying exactly two bits. An encoded byte, containing 8 bits, naturally maps to four cells. The system does not employ base-3 encoding, fractional packing, or unusual bit arithmetic, but instead treats it as a quaternary alphabet mapped directly onto binary pairs.\n\nThe choice of RGBW colors was not arbitrary. Although more colors could theoretically carry more information, camera color perception differs from image source colors. Ambient lighting, shadows, reflections, display brightness, camera white balance, printer ink, paper color, JPEG compression, sensor noise, exposure, viewing angle, and screen color calibration can all affect the way pixels are perceived. By choosing a small set of colors with strong separation, QuadQR avoids confusion caused by similar color states. The current QuadQR alphabet is Red, Green, Blue, and White, with black reserved for structural information like finder patterns, timing structures, and alignment references.\n\nDespite its innovative approach, QuadQR aims to maintain a familiar appearance. The geometry of the matrix code is kept similar to traditional QR codes, including square overall matrix, square modules, three large finder patterns, timing structures, alignment references, and quiet zones. The major experiment occurs in the data representation and decoding pipeline, where QuadQR classifies each payload position as Red, Green, Blue, or White. This allows for effective color-based scanning even in real-world images, taking into account perspective distortion, alignment markers, and color calibration.\n\nIn conclusion, QuadQR is an open-source 2D matrix code that uses four distinguishable visual states (Red, Green, Blue, and White) instead of the traditional binary states. By utilizing a color-aware approach and leveraging modern technology, QuadQR can potentially store more data and support encryption, making it a promising alternative to the widely used QR code.",
  "summary": "QR codes are everywhere. Payments, login flows, restaurant menus, Wi-Fi sharing, tickets, product packaging, device pairing, authentication, links. They have become one of those technologies that quietly works almost everywhere. And there is a very good reason for that. QR Code is mature, standardized, extremely well optimized, and surprisingly resilient. But while working with QR codes, I kept…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}