2025 π Day latest news buy art
And she looks like the moon. So close and yet, so far.Future Islandsaim highmore quotes
very clickable
visualization + design
If you are interested in color, explore my other color tools, Brewer palettes resources, color blindness palettes and math and an exhausting list of 10,000 color names for all those times you couldn't distinguish between tan hide, sea buckthorn, orange peel, west side, sunshade, california and pizzaz.

Designing for Color blindness

Color choices and transformations for deuteranopia and other afflictions

Here, I help you understand color blindness and describe a process by which you can make good color choices when designing for accessibility.

The opposite of color blindness is seeing all the colors and I can help you find 1,000 (or more) maximally distinct colors.

You can also delve into the mathematics behind the color blindness simulations and learn about copunctal points (the invisible color!) and lines of confusion.

In an audience of 8 men and 8 women, chances are 50% that at least one has some degree of color blindness1,2. When encoding information or designing content, use colors that is color-blind safe.

1About 8% of males and 0.5% of females are affected with some kind of color blindness in populations of European descent (wikipedia, Worldwide prevalence of red-green color deficiency, JOSAA). The rate for other races is lower Asians and Africans is lower (Caucasian Boys Show Highest Prevalence of Color Blindness Among Preschoolers, AAO).

2The probability that among `N=8` men and `N=8` women at least one person is affected by color blindness is `P(men,women) = P(8,8) = 1 - (1-0.08)^8(1-0.005)^8 = 0.51`. For `N=34` (i.e., 68 people in total), this probability is `P(34,34)=0.95`. Because the rate of color blindness in women is so low, for most groups of mixed gender we can approximate the probability by only counting the men. For example, in a group of 17 women the probability that at least one of them is color blind is `P(0,17) = 0.082`, which is the same probability as for 1 man, `P(1,0)`.

color receptors are reduced or absent in color blindness

The normal human eye is a 3-channel color detector3. There are three types of photoreceptors, each sensitive to a different part of the spectrum. Their combined response to a given wavelength produces a unique response that is the basis of the perception of color.

3Compared to hearing, the color vision is a primitive detector. While we can hear thousands of distinct frequencies and process them simultaneously, we have only three independent color inputs. While the ear can distinguish pure tones from complex sounds that have multiple frequencies the eye is relatively unsophisticated in separating a color sensation into its three constituent primary stimuli.

People with color blindness have one of the photo receptor groups either reduced in number or entirely missing. With only two groups of photoreceptors, the perception of hue is drastically altered.

For example, in deuteranopia, the most common type of color blindness, the medium (M) wavelength photoreceptors are reduced in number or missing. This results in the loss of perceived difference between reds and greens because only one group of photoreceptors (L) are sensitive to the wavelengths of these colors. The spectrum appears to be split into two hues along the blue-green boundary (see figure below), which is roughly where the photoreceptor sensitivities curves cross.

Color photoreceptor profile for color blindness and the appearance of art and objects. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Each of the three kinds of color blindness are associated with reduced number of each of the three kinds of photoreceptors. In extreme cases, a given type of photoreceptors may be missing. To people with color blindness, objects appear very differently. Artwork is (left) Edvard Munch, Scream (Skrik), 1893, National Gallery, Oslo, Norway (right) Claude Monet, Coquelicots, La promenade (Poppies), 1873, Musée d'Orsay, Paris. Each of the rows in the color ramps on the right show colors that are indistinguishable for each kind of color blindness. (zoom)

Visible light is in the range of 390–700 nm. The exact definition of the upper limit varies, with some sources giving as high as 760 nm. Shorter wavelengths are absorbed by the cornea (<295nm) and lens (315–390nm). Some near infrared light also reaches the retina (760–1,400nm).

it's all the same to me

The Ishihara test is a color perception test for protanopia and deuteranopia. Think of the Rorschach test, except with a different diagnosis if you can't see a pattern.

Traditionally, the Ishihara test is performed with digits but why not use Mr. Spock4. He knows all the digits and is much more insteresting.

4In tribute to Leonard Nimoy, 1931–2015

Spock, indistinguishable to people with color blindness. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The likeness of Mr. Spock drawn using equivalent colors (see image above) for each of the three kinds of color blindness. Image from imagebuddy. (zoom)

simulating color blindness

Color blindness comes in varying degrees and types. Let's consider total deuternanopia—where the M receptors are missing or completely dysfunctional. Because they only have two kinds of color receptors, someone with this condition will see only two dimensions of color.

To understand how to simulate color blindness we have to look briefly at how color can be represented. You're probaby familiar with the RGB color space—just one kind of many color spaces. The RGB coordinates of a color are a device-dependent output model—they tell a device, such as your monitor or TV how much of a pixel's red, green and blue to activate. Obviously, depending on which specific display panel we're talking about, the output color might actually look very different—it's a function of the actual phosphors and any calibration and adjustments.

It turns out that we can also specify color in terms of coordinates in a space based on the physiological response of the eye to the color. Since a normal eye has three photoreceptors whose sensitivity is centered on short (S), medium (M) and long (L) wavelengths, any given color (i.e. monochromatic light) creates a unique combination of S, M and L cone response.

Using a color's LMS coordinates we can simulate color blindness by modifying the coordinate that corresponds to the missing photoreceptor under the observations that (a) deuteranopes, for example, can distinguish white and greys from blues and greens and (b) colors for which the sensitivity of the missing photoreceptors is low should be perceived normally.

Using the LMS color space to simulate color blindness / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Color blindness can be simulated by considering a color's coordinates in LMS space. (zoom)

Because color blindess reduces the number of color dimensions, a large number of colors distinguishable to people with normal vision appear the same to someone with color blidness. The ramps below show these families of equivalent colors.

Color palettes and selections for color blindness / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Sets of representative hues and tones that are indistinguishable to individuals with different kinds of color blindness. (zoom)

super color vision

The opposite condition to color blindness exists too—tetrachromacy. In this case, an individual has an extra type of color receptor which improves discrimination in the red part of the spectrum. While the anatomy of their retina can be described, how true tetrachromats subjectively perceive color is unknown. And, perhaps, even unknowable.

Tetrachromacy is common in other animals, such as fish (e.g. goldfish, zebrafish) and birds (e.g. finch, starling). The dimensionality of the perceived color space isn't necessarily proportional to the number of different receptors. If the signal from 3 color receptors are combined by the brain and each processor has a weighted response to a broad range of wavelengths, then a color can be modeled by a point in 3-dimensional space, in which the receptors are the axes. This system can perceive a large number of colors.

In the extreme case where the receptors respond to a very narrow range, of which none overlap with the other, a color is one of three points in a 1-dimensional space. This sytem can perceive only 3 colors.

For example, although the mantis shrimp has 12 different color receptors, the receptors work independently, their color discrimination is poorer than ours.

news + thoughts

Happy 2025 π Day—
TTCAGT: a sequence of digits

Thu 13-03-2025

Celebrate π Day (March 14th) and sequence digits like its 1999. Let's call some peaks.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2025 π DAY | TTCAGT: a sequence of digits. The digits of π are encoded into DNA sequence and visualized with Sanger sequencing. (details)

Crafting 10 Years of Statistics Explanations: Points of Significance

Sun 09-03-2025

I don’t have good luck in the match points. —Rafael Nadal, Spanish tennis player

Points of Significance is an ongoing series of short articles about statistics in Nature Methods that started in 2013. Its aim is to provide clear explanations of essential concepts in statistics for a nonspecialist audience. The articles favor heuristic explanations and make extensive use of simulated examples and graphical explanations, while maintaining mathematical rigor.

Topics range from basic, but often misunderstood, such as uncertainty and P-values, to relatively advanced, but often neglected, such as the error-in-variables problem and the curse of dimensionality. More recent articles have focused on timely topics such as modeling of epidemics, machine learning, and neural networks.

In this article, we discuss the evolution of topics and details behind some of the story arcs, our approach to crafting statistical explanations and narratives, and our use of figures and numerical simulations as props for building understanding.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Crafting 10 Years of Statistics Explanations: Points of Significance. (read)

Altman, N. & Krzywinski, M. (2025) Crafting 10 Years of Statistics Explanations: Points of Significance. Annual Review of Statistics and Its Application 12:69–87.

Propensity score matching

Mon 16-09-2024

I don’t have good luck in the match points. —Rafael Nadal, Spanish tennis player

In many experimental designs, we need to keep in mind the possibility of confounding variables, which may give rise to bias in the estimate of the treatment effect.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Propensity score matching. (read)

If the control and experimental groups aren't matched (or, roughly, similar enough), this bias can arise.

Sometimes this can be dealt with by randomizing, which on average can balance this effect out. When randomization is not possible, propensity score matching is an excellent strategy to match control and experimental groups.

Kurz, C.F., Krzywinski, M. & Altman, N. (2024) Points of significance: Propensity score matching. Nat. Methods 21:1770–1772.

Understanding p-values and significance

Tue 24-09-2024

P-values combined with estimates of effect size are used to assess the importance of experimental results. However, their interpretation can be invalidated by selection bias when testing multiple hypotheses, fitting multiple models or even informally selecting results that seem interesting after observing the data.

We offer an introduction to principled uses of p-values (targeted at the non-specialist) and identify questionable practices to be avoided.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Understanding p-values and significance. (read)

Altman, N. & Krzywinski, M. (2024) Understanding p-values and significance. Laboratory Animals 58:443–446.

Depicting variability and uncertainty using intervals and error bars

Thu 05-09-2024

Variability is inherent in most biological systems due to differences among members of the population. Two types of variation are commonly observed in studies: differences among samples and the “error” in estimating a population parameter (e.g. mean) from a sample. While these concepts are fundamentally very different, the associated variation is often expressed using similar notation—an interval that represents a range of values with a lower and upper bound.

In this article we discuss how common intervals are used (and misused).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Depicting variability and uncertainty using intervals and error bars. (read)

Altman, N. & Krzywinski, M. (2024) Depicting variability and uncertainty using intervals and error bars. Laboratory Animals 58:453–456.

Martin Krzywinski | contact | Canada's Michael Smith Genome Sciences CentreBC Cancer Research CenterBC CancerPHSA
Google whack “vicissitudinal corporealization”
{ 10.9.234.152 }