graduapp.com

Exploring the Mathematics Behind Digital Colors and Vision

Written on

Chapter 1: The Relationship Between Nature and Color

"Nature Always Wears The Colors Of The Spirit" — Ralph Waldo Emerson

The interplay of light, color, and our perception of them forms the essence of beauty and a gateway to understanding the world around us. This quest to unravel the mysteries of sight has intrigued many brilliant minds throughout history, including the likes of Da Vinci, Newton, Young, and Franklin. Our desire to grasp the intricacies of our primary sense—sight—seems insatiable. Despite significant advancements in our comprehension of vision, it is evident that we are merely scratching the surface in the realm of augmenting our visual experience. As we stand on the brink of a new era, it is crucial to revisit foundational concepts. At its core, mathematics intricately connects with our understanding of vision. We will embark on a journey to explore how our grasp of color has evolved from rudimentary insights about human anatomy to the sophisticated digital representations we have today.

Discovering Foundational Principles

The pursuit of a deeper understanding of vision likely traces back to the dawn of humanity, as it is essential for survival. Thus, it’s only natural to ponder the questions of what, why, and how we perceive our surroundings. To maintain focus, we will concentrate on the contributions of three pivotal figures: Young, Helmholtz, and Svaetichin.

Our first stop introduces the remarkable Thomas Young, a British polymath who delved into both the anatomy of the eye and the physics of light. His influential work, "On the Theory of Light and Colours," introduced two groundbreaking theories. He first proposed the wave theory of light and showcased how different colors correspond to various wavelengths using diffraction, setting the stage for his famed double-slit experiment. He also formulated the theory of trichromatic vision, explaining how our eyes perceive colors—a concept confirmed by the presence of three types of cones in the retina.

Fast forward to the 1860s, Hermann von Helmholtz built upon Young's findings. While Young suggested only three types of photoreceptors, Helmholtz demonstrated their existence and functionality. He theorized that these photoreceptors respond to varying wavelengths of light: short, medium, and long. While there was debate over which colors corresponded to these wavelengths, Helmholtz proved that all visible colors could be created by combining three primary colors.

Next, we encounter Gunnar Svaetichin, a physiologist who explored the sensitivity of fish retinas to different wavelengths of light, supporting the Young-Helmholtz trichromatic theory with biological evidence.

Our Contemporary Understanding

While entire textbooks could delve into the anatomy of the eye, we will focus on the retinal layers responsible for interpreting color and light. Within the retina, the innermost light-sensitive layer, reside millions of rods and cones. Rods dominate our peripheral and low-light vision, with approximately 120 million cells per retina, but they lack color sensitivity. Conversely, cones, numbering around 6 million per retina, are responsible for high-resolution color vision.

Each type of cone contains a unique photosensitive pigment, attuned to specific wavelengths of light. The three cones—L, M, and S—respond best to long (around 560 nm), medium (530 nm), and short (420 nm) wavelengths, respectively. Recent findings indicate that 64% of cones are red-sensitive, 32% are green-sensitive, and only 2% are blue-sensitive, with green and red cones concentrated in the fovea while blue cones are positioned elsewhere.

Armed with this historical context and modern insights, we are now ready to explore the mathematics behind the transition from biological to digital color representation, spanning decades of research and technological advancement. How did we progress from Maxwell's first color photograph in 1870 to the vivid LCD screens of today? Let's delve into the mathematics of this transformation.

The Mathematical Foundations of True Color (24-Bit)

Everyone knows what a pixel is—the basic unit of an image. When you zoom in on your screen, you see countless pixels, each formed by three closely spaced RGB light sources. From a standard viewing distance, these sources blend together, creating the illusion of solid color.

In the late 1990s, the competition among various pixel structuring methods led to the establishment of a universal standard: True Color (24-Bit) color depth. This standard is now integral to virtually all displays, including televisions, computers, and smartphones, and serves as the foundation for color representation in design software. To understand why True Color became the gold standard, we must first consider the limits of human color perception.

Psychologist Frank Geldard's 1972 study suggested that humans can distinguish around 7 million different color variations, while a 1996 study by Kurt Kleiner estimated this figure at approximately 2.3 million. Thus, to develop a universal color system, we must aim to represent at least 2.3 million colors.

Research indicates that the average human eye can differentiate around 150 hues within each RGB channel. This mathematical validation confirms that 150³ (approximately 3.4 million) falls within the range of our earlier estimates.

Now, let's shift our focus to the digital realm, starting with the fundamental unit of information: a bit. Due to the principles of circuit design, a bit can only represent one of two states—0 or 1. If each RGB value can represent up to 150 gradients, we must determine the minimum number of bits required to store these values. We need to find a value n such that 2ⁿ > 150. Solving for n shows that we need at least 8 bits per color channel in an RGB model to ensure all perceptible colors are displayed.

Interestingly, in computer science, 8 bits are known as a byte. Since three bytes (24 bits) can fully represent the RGB model, this system effortlessly accommodates non-binary color coding that is user-friendly. In design software, users can manually input values from 0 to 255 (256 total possibilities) for each RGB channel, confirming that this range stems from 2⁸.

You may also encounter hexadecimal color codes, such as #012f5b. In this system, each character represents one of sixteen possible values (0-9 and A-F), with pairs corresponding to the three RGB channels. Again, this checks out mathematically, as each pair of characters can represent 256 colors (2⁸).

In Conclusion

By unraveling the mathematics behind True Color (24-Bit), we uncover a fascinating coincidence: an RGB channel stored in a single byte encapsulates all perceptible shades for the average viewer. Any deviation in data storage, such as using seven or nine bits, would have led us astray. Thus, the rationale for True Color (24-Bit) as the universal digital standard becomes evident.

However, as we transition from mere replication to augmentation, how will our understanding of color continue to evolve? What new patterns and principles will emerge as we push the boundaries of our most vital sense?

This essay is part of a series on mathematical topics published in Cantor's Paradise, a weekly Medium publication. Thank you for reading!

The first video titled "How To Draw An Ice Cream Cone Pixel Art" offers a step-by-step tutorial on creating pixel art, showcasing techniques that blend creativity with digital artistry.

In the second video, "Code your own pixel art ice cream cone - mystery reveal for Google Sheets," viewers learn how to create pixel art using Google Sheets, merging coding with creative design.

Share the page:

Twitter Facebook Reddit LinkIn

-----------------------

Recent Post:

Transform Your Life in One Year: The Power of Daily Intentions

Explore how daily actions and consistency can lead to significant personal growth and fulfillment over one year.

Unlocking Your Productivity Potential: Simple Strategies That Work

Discover effective strategies to enhance productivity without feeling overwhelmed.

Enhancing Your Ruby on Rails App: Top Performance Monitoring Tools

Discover essential tools for monitoring and optimizing performance in your Ruby on Rails applications.

Title: The Transformative Role of School Meals in Canada

Exploring the vital impact of school meals on children's education and well-being in Canada.

Exploring Life as a Digital Nomad in the World of Tech

Discover the daily routine of a digital nomad in tech, embracing flexible work and the opportunities of a remote lifestyle.

Unlock Your Potential: Learning Strategies Inspired by Einstein

Explore effective learning techniques inspired by Einstein to boost memory, reading speed, and focus.

Mastering Network Traffic Sniffing: A Beginner's Guide

Learn effective traffic sniffing techniques using basic tools and protect your data from potential threats.

Innovative Solar Energy Storage: New Material Breakthrough

Researchers unveil a novel material for solar energy storage that can hold energy for months, revolutionizing renewable energy usage.