2023 Pi Daylatest newsbuy art
Trance opera—Spente le Stellebe dramaticmore 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.

Color palettes for color blindness

In this section, I cover how to make good color choices when considering audiences with color blindness.

With the exception of the 8-color palette, all palettes have been created using a process (read below) that tries to maintain perceptual luminance uniformity in color-blind space.

1 · Conservative 8-color palette for colorbliness

This 8-color palette is adapted from Nature Method's Points of View: Color blindness by Bang Wong. Note that in that original source the RGB values listed in the table did not exactly correspond to the RGB swatches—probably an RGB vs CMYK conversion mixup.

This palette is suitable for categorical color encoding—the colors do not, as a whole, have a natural order and none is substantially more salient than another.

You can download these colors as plain text list of HEX and RGB values.

An 8-color palette for color blindness. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
An 8-color palette for color blindness, adapted from Wong, B. (2011) Nature Methods 8:441. (PDF, plain text)

For more tips about designing with color blindness in mind, see Color Universal Design (CUD) — How to make figures and presentations that are friendly to people with color blindess.

2 · Using color equivalencies

To people with color blindness, some colors appear the same. This equivalence can be used to identify colors that are distinct to those with normal as well as to those with color blindness.

For a given RGB color we can simulate how it would appear to someone with color blindess and identify groups of RGB colors that appear indistinguishable in color blindness.

Color equivalencies in color blindness for protanopia, deuteranopia and tritanopia. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Many colors appear the same to people with color blindness. This chart shows the colors that are identical (rows) to those with protanopia, deuteranopia (most common) and tritanopia

These equivalencies can be used to construct color palettes—lists of colors that are distinguishable to deuteranopes and those with normal vision.

Since deuteranopia is the most common, this is the condition that I use for color selection.

The exact luminance (perceived brightness) of the simulated color varies depending on the color blindness algorithm. Each row in the squares above should look identical using any color blindness simulation (e.g. Color Oracle, Photoshop, etc) but brightness of the rows may be slightly different than shown here.

3 · 12-color palette for colorbliness

This palette maps four colors onto each of the two color dimensions in deuteranopes and four onto greyscale. This palette is very useful for designing transit and subway maps.

Color names are playful selections from my list of 10,000 color names.

You can download these colors as plain text list of HEX and RGB values.

A 12-color palette for color blindness. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A 12 color palette for color blindness that maps onto each of the color dimensions in deuteranopes. Within each set of four, colors also have reasonably similar greyscale tones. Inset swatches show color alternatives that are indistinguishable from the main swatch for deuternopes. (PDF, plain text)

4 · 15-color palette for colorbliness

You can download these colors as plain text list of HEX and RGB values.

A 15-color palette for color blindness. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A 15-color palette for color blindness. (PDF, plain text)

5 · 24-color palette for colorbliness

Even more color choices for color blindess, including colors that map onto greys. For these, I don't have RGB/HEX values handy.

You can download these colors as plain text list of HEX and RGB values.

15-color palettes for color blindness / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
15-color palettes designed for each of the three types of color blindness: deuteranopia, protanopia and tritanopia. Palettes are shown as they appear to someone with normal vision as well as to someone affected with each of the three types of color blindness. Each palette contains three groups of swatches, matching to two of the color channels and greys. Within each group colors in the same row map onto the same color. (PDF)

6 · The last word on color palettes for colorbliness

You can create your own color palettes using the figure below.

For a given color blindness type (e.g. deuteranopia) and channel (e.g. blue), the rows represent reasonably uniform steps in LCH luminance of the simulated color and a rich (high chroma) simulation at that luminance.

The last word on color palettes for color blidness. / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Color ramps of 16–19 colors for each color channel for each color blidness type. Color ramps show RGB colors and their color blindness simulation grouped by channels (e.g. greys, blues, yellow). Within a channel, colors are sorted in increasing and roughly equal steps of LCH luminance of the simulated color. At a given luminance, the RGB color whose simulation has the highest chroma is used. (PDF)
news + thoughts

Convolutional neural networks

Thu 17-08-2023

Nature uses only the longest threads to weave her patterns, so that each small piece of her fabric reveals the organization of the entire tapestry. – Richard Feynman

Following up on our Neural network primer column, this month we explore a different kind of network architecture: a convolutional network.

The convolutional network replaces the hidden layer of a fully connected network (FCN) with one or more filters (a kind of neuron that looks at the input within a narrow window).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Convolutional neural networks. (read)

Even through convolutional networks have far fewer neurons that an FCN, they can perform substantially better for certain kinds of problems, such as sequence motif detection.

Derry, A., Krzywinski, M & Altman, N. (2023) Points of significance: Convolutional neural networks. Nature Methods 20:.

Background reading

Derry, A., Krzywinski, M. & Altman, N. (2023) Points of significance: Neural network primer. Nature Methods 20:165–167.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of significance: Logistic regression. Nature Methods 13:541–542.

Neural network primer

Tue 10-01-2023

Nature is often hidden, sometimes overcome, seldom extinguished. —Francis Bacon

In the first of a series of columns about neural networks, we introduce them with an intuitive approach that draws from our discussion about logistic regression.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Neural network primer. (read)

Simple neural networks are just a chain of linear regressions. And, although neural network models can get very complicated, their essence can be understood in terms of relatively basic principles.

We show how neural network components (neurons) can be arranged in the network and discuss the ideas of hidden layers. Using a simple data set we show how even a 3-neuron neural network can already model relatively complicated data patterns.

Derry, A., Krzywinski, M & Altman, N. (2023) Points of significance: Neural network primer. Nature Methods 20:165–167.

Background reading

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of significance: Logistic regression. Nature Methods 13:541–542.

Cell Genomics cover

Mon 16-01-2023

Our cover on the 11 January 2023 Cell Genomics issue depicts the process of determining the parent-of-origin using differential methylation of alleles at imprinted regions (iDMRs) is imagined as a circuit.

Designed in collaboration with with Carlos Urzua.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Our Cell Genomics cover depicts parent-of-origin assignment as a circuit (volume 3, issue 1, 11 January 2023). (more)

Akbari, V. et al. Parent-of-origin detection and chromosome-scale haplotyping using long-read DNA methylation sequencing and Strand-seq (2023) Cell Genomics 3(1).

Browse my gallery of cover designs.

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

Science Advances cover

Thu 05-01-2023

My cover design on the 6 January 2023 Science Advances issue depicts DNA sequencing read translation in high-dimensional space. The image showss 672 bases of sequencing barcodes generated by three different single-cell RNA sequencing platforms were encoded as oriented triangles on the faces of three 7-dimensional cubes.

More details about the design.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
My Science Advances cover that encodes sequence onto hypercubes (volume 9, issue 1, 6 January 2023). (more)

Kijima, Y. et al. A universal sequencing read interpreter (2023) Science Advances 9.

Browse my gallery of cover designs.

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

Regression modeling of time-to-event data with censoring

Thu 17-08-2023

If you sit on the sofa for your entire life, you’re running a higher risk of getting heart disease and cancer. —Alex Honnold, American rock climber

In a follow-up to our Survival analysis — time-to-event data and censoring article, we look at how regression can be used to account for additional risk factors in survival analysis.

We explore accelerated failure time regression (AFTR) and the Cox Proportional Hazards model (Cox PH).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Regression modeling of time-to-event data with censoring. (read)

Dey, T., Lipsitz, S.R., Cooper, Z., Trinh, Q., Krzywinski, M & Altman, N. (2022) Points of significance: Regression modeling of time-to-event data with censoring. Nature Methods 19:1513–1515.


© 1999–2023 Martin Krzywinski | contact | Canada's Michael Smith Genome Sciences CentreBC Cancer Research CenterBC CancerPHSA