Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / - contact me Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / on Twitter Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / - Lumondo Photography Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / - Pi Art Martin Krzywinski / Canada's Michael Smith Genome Sciences Centre / - Hilbertonians - Creatures on the Hilbert CurveMartin Krzywinski / Canada's Michael Smith Genome Sciences Centre / - Pi Day 2020 - Piku
syncopation & accordionCafe de Flore (Doctor Rockit)like France, but no dog poopmore quotes

blue: pretty

PNAS Cover: Earth BioGenome Project

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 Blindess

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 colorblindness 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
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
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
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
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

Survival analysis—time-to-event data and censoring

Fri 05-08-2022

Love's the only engine of survival. —L. Cohen

We begin a series on survival analysis in the context of its two key complications: skew (which calls for the use of probability distributions, such as the Weibull, that can accomodate skew) and censoring (required because we almost always fail to observe the event in question for all subjects).

We discuss right, left and interval censoring and how mishandling censoring can lead to bias and loss of sensitivity in tests that probe for differences in survival times.

Martin Krzywinski @MKrzywinski
Nature Methods Points of Significance column: Survival analysis—time-to-event data and censoring. (read)

Dey, T., Lipsitz, S.R., Cooper, Z., Trinh, Q., Krzywinski, M & Altman, N. (2022) Points of significance: Survival analysis—time-to-event data and censoring. Nature Methods 19:906–908.

3,117,275,501 Bases, 0 Gaps

Fri 05-08-2022

See How Scientists Put Together the Complete Human Genome.

My graphic in Scientific American's Graphic Science section in the August 2022 issue shows the full history of the human genome assembly — from its humble shotgun beginnings to the gapless telomere-to-telomere assembly.

Read about the process and methods behind the creation of the graphic.

Martin Krzywinski @MKrzywinski
3,117,275,501 Bases, 0 Gaps. Text by Clara Moskowitz (Senior Editor), art direction by Jen Christiansen (Senior Graphics Editor), source: UCSC Genome Browser.

See all my Scientific American Graphic Science visualizations.

Anatomy of SARS-Cov-2

Tue 31-05-2022

My poster showing the genome structure and position of mutations on all SARS-CoV-2 variants appears in the March/April 2022 issue of American Scientist.

Martin Krzywinski @MKrzywinski
Deadly Genomes: Genome Structure and Size of Harmful Bacteria and Viruses (zoom)

An accompanying piece breaks down the anatomy of each genome — by gene and ORF, oriented to emphasize relative differences that are caused by mutations.

Martin Krzywinski @MKrzywinski
Deadly Genomes: Genome Structure and Size of Harmful Bacteria and Viruses (zoom)

Cancer Cell cover

Sat 23-04-2022

My cover design on the 11 April 2022 Cancer Cell issue depicts depicts cellular heterogeneity as a kaleidoscope generated from immunofluorescence staining of the glial and neuronal markers MBP and NeuN (respectively) in a GBM patient-derived explant.

LeBlanc VG et al. Single-cell landscapes of primary glioblastomas and matched explants and cell lines show variable retention of inter- and intratumor heterogeneity (2022) Cancer Cell 40:379–392.E9.

Martin Krzywinski @MKrzywinski
My Cancer Cell kaleidoscope cover (volume 40, issue 4, 11 April 2022). (more)

Browse my gallery of cover designs.

Martin Krzywinski @MKrzywinski
A catalogue of my journal and magazine cover designs. (more)

Nature Biotechnology cover

Sat 23-04-2022

My cover design on the 4 April 2022 Nature Biotechnology issue is an impression of a phylogenetic tree of over 200 million sequences.

Konno N et al. Deep distributed computing to reconstruct extremely large lineage trees (2022) Nature Biotechnology 40:566–575.

Martin Krzywinski @MKrzywinski
My Nature Biotechnology phylogenetic tree cover (volume 40, issue 4, 4 April 2022). (more)

Browse my gallery of cover designs.

Martin Krzywinski @MKrzywinski
A catalogue of my journal and magazine cover designs. (more)