Hacker News new | past | comments | ask | show | jobs | submit login
How to pick more beautiful colors for your data visualizations (2020) (datawrapper.de)
298 points by williamwoodhq on Dec 1, 2023 | hide | past | favorite | 45 comments



The author is missing one law of design that should be explicitly stated here: different things should look different and things that look different should be different. The example under "Don’t dance all over the color wheel" is a great example of a violation of this rule: it goes from showing five different things in bars to showing two groups of two plus one different thing (or a group of two and a group of three, it's actually not very clear). One of those interpretations is wrong, or unuseful, and careful color choice can make the right inference the correct inference.

This mistake is repeated in several places. But there's an example of where it's done well just below the heading "Avoid bright, saturated colors", where the colors suggest a relationship that in fact does exist and is meaningful (Asia is in blue).

And note that this isn't about banning similar colors from use. It's about what goes wrong when they're used in proximity, and exclusively so. (By chance a couple times in a big graphic is fine, since there are many places they won't be together, so no real implied relationship exists.) Of course using similar colors exclusively distant from each other is a straight-up confusion risk, so it's still an issue.


Jep when it comes to represent data the colors should not be “beautiful” they should be distinctive and meaningful

There are quite good color maps for presenting scientific data which takes most of your points into account, I personally use the „scientific color maps” for representation: https://www.fabiocrameri.ch/colourmaps/


I'd like to recommend this color palette that has been optimized for accessibility https://jfly.uni-koeln.de/color/#pallet


These colors really capture what I dislike about modern color design. I rather have gaudy bright colors than all these pastels. Almost every "Not Ideal" look so much nicer and with character. She managed to make everything look like a brochure at a children's hospital

I think a simple piece of advice (stolen from Tuft) is to not use colors unless you really need to. If you can find a way to present the same information in black and white - it's generally going to be better. The next step up.. If you need to highlight somethings, maybe just use one color (ex: red). Don't bring out the whole pastel bile rainbow immediately. And try to stick to consistent colors to convey meaning

For color gradients I find these incredibly useful (though the license/attribution-requirement is kinda annoying)

https://colorcet.com/


Thank you from the color blind camp! The whole article neglects accessibility for people with vision problems.


The same author has written three other articles specifically on colorblindness and data visualization:

https://blog.datawrapper.de/colorblindness-part1/ https://blog.datawrapper.de/colorblindness-part2/ https://blog.datawrapper.de/colorblindness-part3/


They miss out on the face that accessibility should be a default consideration as a designer. It's not a specific realm that needs designed separately. Assume that someone will always be colourblind.


Also, a key problem that some of those “ideal” colour choices run into is how many people out there have shockingly bad screens, or half decent screens setup oddly for their lighting environment. What looks more pleasant on my screen and yours, using choices that are not “all over the colour wheel” might result in things not looking different enough on other people's screens. Sometimes it is fine when the colours are next to each other, but not when they are shown alone or on the same display but far apart. The “same display but far apart” can be an issue itself with really bad displays, with, for example, two colours that look distinct in one corner looking almost identical in another or in the middle.

A milder symptom of the issue is that even for people with good enough screens setup reasonably well, there will be differences between them that compound the fact that we all perceive what is good in colour selections slightly differently to become an obvious example of the adage “you can't please everyone all the time”.

> the license/attribution-requirement is kinda annoying

There might be circumstances where it is a mild inconvenience, but I don't see the attribution clause of CC-BY to be at all arduous. Though I would suggest they change the text to explicitly mention v4 (the link does, but the text doesn't) – earlier versions of the BY licences had an accidental trap that could be used by unpleasantly by legal trolls in some jurisdictions (ref: https://creativecommons.org/2022/02/08/copyleft-trolls/)


All personal opinion .. But I honest hate attribution licenses. In many cases it's inconvenient and not obvious how and where to put it

Say I made a poster at a conference and a small graph uses his colors. Where am I to put this attribution? Can you imagine if every color you used required an attribution ? Thankgod Microsoft doesn't require it in every PowerPoint presentation

I find the whole thing sorta legalistic and inhuman. You attribute when it's relevant. If you're extending something then I think it's the decent thing to attribute who's work you're basing it on, when possible relevant and convenient. Having stuff like pasting in "OpenStreetMap" in the corner of every single map online just makes the world uglier and doesn't help anyone. (not to mention it doesn't even give exposure to the people who mapped the area you're showing)

Id gladly pay $10 to the guy so I never have to use an attribution

EDIT: Just to illustrate the horror. There is an R package with these colors: https://cran.r-project.org/web/packages/cetcolor/cetcolor.pd...

First time I've seen a library with "License CC BY-SA 4.0". A library that requires attribution in whatever it creates.. 0_0


The attribution in that package hardly seems at all excessive, particularly given is it essentially a wrapper around the original work. Unless I'm missing something obvious (which is not an uncommon occurrence!). What about it makes you feel strongly enough to use the word “horror”?

My reading is that the attribution is not needed for the library, but for the output. It isn't “creating” that output as such, just regurgitating the original colour map data and the attribution needed if for that data.

But if the attribution requirement is for the library as well as the information it presents:

> Id gladly pay $10 to the guy so I never have to use an attribution

Maybe that is an option. Or if not, as with all licences we can't/won't agree to, there are other things you could use instead or even produce your own from first principles.


At the end of the day, it's his project to license :)

Licenses that require the output to have attribution? I've honestly never seen it before. Next we'll have fonts that require attributions.. The closest thing I've seen is some programs stipulating the output must not be used for profit. Maybe horrifying is hyperbolic, but it's honestly quite sneaky ... and I'd never notice something like that. CC BY-SA 4.0 isn't really a code license.. and if I saw that I'd not even be sure what that means. My initial impression was it'd mean you can copy, modify and redistribute the source code - as long as you attribute it?

"or even produce your own from first principles"

Not a bad idea though probably not so straightforward. Doing a quick websearch, I'm surprised nobody seems to have reproduced it

EDIT: Searching a bit more.. it seems people just use these colors without attribution :/


The not ideal colours are almost universally "too loud" and "in your face" for me.


A good compromise could be running them through CMYK softproofing. As a bonus, you'll get colors that are more printable.


> I think a simple piece of advice (stolen from Tuft) is to not use colors unless you really need to.

Funny, read your comment as my copy of Tufte's VDoQI is open to page 154:

"Color often generates graphical puzzles. Despite our experiences with the spectrum in science textbooks and rainbows, the mind's eye doe not readily give a visual ordering to colors, except possibly for red to reflect higher levels than other levels [...] Attempts to give colors an order result in those verbal decoders and the mumbling of little mental phrases [...] Because they do have a natural visual hierarchy, varying shades of gray show varying quantities better than color."


I guess tastes are different, but I can't really follow how you like the not- ideal super bright colors and at the same time advocate using only shades of grey.

Shades of grey colorized would result in the same pastel colors you seem to dislike, because grey, by definition, isn't "full brightness".


> I rather have gaudy bright colors than all these pastels. Almost every "Not Ideal" look so much nicer and with character. She managed to make everything look like a brochure at a children's hospital

That's a great description that goes with my (conspiracy?) theory: Popular media intended for general consumption (which are the exampes the author shows) uses these colours not because they're better for comprehension, but because a big segment of the general public is afraid of data and charts, and these colours let the data fade away into the background for those folks.

The point is to subtly say "it's okay if you don't get this data, this isn't really important" - a compromise between omitting the data altogether and giving it full importance and clarity.


IBM did research back in the 90s on perceptually-based colormaps and how to best represent various types of data within the color dimensions of luminescence, saturation and hue [1]. For example, they found that,

(1) Hue was not a good dimension for encoding magnitude information, i.e. rainbow color maps are bad.

(2) The mechanisms in human vision responsible for high spatial frequency information processing are luminance channels. If the data to be represented have high spatial frequency, use a color map which has a strong luminance variation across the data range.

(3) For interval and ratio data, both luminance- and saturation-varying color maps should produce the effect of having equal steps in data value correspond to equal perceptual steps, but the first will be most effective for high spatial frequency data variations and the second will be most effective for low spatial frequency variations.

===

[1] the original link got removed from IBMs website. Back in the day it was under

https://www.research.ibm.com/people/l/lloydt/color/color.HTM

A pdf copy is here:

https://github.com/frankMilde/interesting-reads/blob/master/...


> (1) Hue was not a good dimension for encoding magnitude information, i.e. rainbow color maps are bad.

This is very good advice. Generally, hue expresses difference in kind whilst lightness and saturation expresses difference in degree. This is beautifully demonstrated in Nault's study of how children read maps.

Nault, W.H.: Children’s Map Reading Abilities. Geographic Society of Chicago, Newsletter, III (1967)


Is there any online fulltext link to that? It's pretty weird you used the exact same reference with the exact same format as your own earlier comment in this 2021 submission https://news.ycombinator.com/item?id=26489887

the study sounds interesting though


> Is there any online fulltext link to that?

I looked for one but could not find. This is unusual for me as I prefer to have the full text of anything I cite.

For me (someone who has an interest in computational aesthetics) the value of such studies is that they confirm what we already know. I explain the key difference between lightness and hue/saturation to my student in this way:

==> Lightness evolved as a matter of necessity. Any light-dwelling creature without it will quickly become food. This accounts for the co-evolution of so many eye-types (fly, mammal, octopus' etc... all structurally distinct).

==> In primates, Hue/lightness vision evolved in response to the rare treat of fruit-sourced carbohydrates.

In other words: lightness is a requisite of survival, hue/saturation is a pleasurable elaboration. It is likely for this reason that in a traditional art school education, you are taught lightness before colour.

> It's pretty weird you used the exact same reference with the exact same format as your own earlier comment in this 2021 submission https://news.ycombinator.com/item?id=26489887

I had completely forgotten that I had referenced this before. Likely the similarity in format is a result of my having copy/pasted from my co-authored book 'Computational Approaches in the Transfer of Aesthetic Values from Paintings to Photographs'. In this book I address similar subject to the ones raise by the OP.


Normally my disability barely affects my everyday life. But when it comes to data visualization I am often faced with very poorly-thought design as a lot of people really don't care about contrast and so on enough for color-blind folks.

It might be difficult for data to look good and be colour-blind accessible at the same time; but when your goal is to inform people then I think accessibility should take a little priority.

This is a good article, it gives a lot of good example of accessible design that (i presume) still looks really good.


Out of curiosity, when using a OS set up to consider a color-blindness, does rendering help at all? I understand that printed materials are a total different story.


If you are building things that need programatic color choices look no further than D3's utils.

https://d3js.org/d3-scale-chromatic

https://d3js.org/d3-scale-chromatic/categorical


...and the equivalent if you're using python for visualisation would be seaborn's palettes https://seaborn.pydata.org/tutorial/color_palettes.html


I might be alone in this but I find a lot of the examples subjective and I prefer the “not idea” to the “better”

That’s strange because I care a lot about color, datavis, and generally agree with these types of articles.


The one about green where it recommends shifting it blue or yellow made me recoil, like shut the article down as fast as I could because the one they suggested was a revolting bile color. Sure, I absolutely respect the power of color theory, but this article was kinda heavy handed and most of the examples just really rubbed me the wrong way, like why is virtually every example just desaturated and low contrast to make it a sickly gray, and why does some of their advice contradict later advice (especially regarding contrast)?


Yeah I immediately thought of the blorange hell of modern movies: https://priceonomics.com/why-every-movie-looks-sort-of-orang...


I first remember it from Eyes Wide Shut (1999) - not mentioned in the linked article.

It's wonderful that what used to be called a genteel amber & teal, is now known as blorange horror.


If you literally recoil from a colour choice you are probably far at some end of the bell curve and this article is not suitable for you, but that doesn't mean it's wrong.


Not typically. As the person I I responded to observed: I usually respond well to these sorts of articles and enjoy them.


They have the right idea with the theory, but there's some nuance in proper execution. If I learned anything from photography, it's that the best adjustments are barely on the edge of perception.

If you averaged the before and after examples (allowing that the "average" of colours is a complicated subject in itself), they would probably be pretty good.


And over here, I agreed with every one of the author’s “better”.

Maybe I’ve just adapted to the current zeitgeist and conventions of data vis I come across in e.g. Tableau or the Economist.


One thing I didn't see mentioned, which is a pet peeve of mine, was how it's not ideal to use just hue or just lightness when you're supposed to read values from a dataset.

Case in point:

https://blog.datawrapper.de/wp-content/uploads/2021/01/full-...

Which slice of the pie represents Japan? Probably the leftmost, but they happen to be few and ordered, so it's easy to infer that.

Now imagine this is a map, not a pie chart and you don't know where Japan is. Pretty hard to tell those very similar blues apart.

One way out of this is to use two lightness levels per hue and sufficiently distant colours:

https://www.researchgate.net/profile/Md-Sariful-Islam-6/publ...


The colors should not upstage and/or distract from the underlying information it aims to communicate. Beautiful is subjective. Instead, channel your inner journalist and aim for objective, neutral, etc.

Like most visual asthetic efforts, when in doubt (and that's most of us), "under-designing" is better than over-designing. And there's certainly no shame in borrowing a color palette from a previous effort that just worked.

If you find yourself wanting to apply creativity to your data visualizations, put down the gun (i.e., mouse) and go for a walk.

p.s. Also, don't forget to pick the right type of chart for what's to be communicated. We've all seen too many instances of "Ooooh. *That's* what's wanting to be communicated??!!"


Iff designers sometimes kill functionality for what is perceived as stylish. I wonder how colorblind persons deal with these pastels. I know kindergarten colors may not fit the rest of the sites colorscheme but consider that charts are often relaying important information that should probably be accessible to everyone.

Taupe, salmon and sage may not be the best choices.

Just sayin….


The article explicitly brings this up under the heading "Combine colors with different lightness".

> Just convert your colors to black & white


It's interesting seeing the orange-blue obsession of Hollywood has expanded to data visualizations as well.

I agree that it's a good "generic, professional" set of colors, but that's usually not the ideal goal. Know your audience, and you can do much better. Even something simple like "use the company color set" is probably going to get much better reception. If your manager likes bright and colorful, you shouldn't go with pastels.


Unfortunately no mention of colorbrewer (https://colorbrewer2.org)


Excellent article. Many of these rules I had gathered over time myself from artistic endevour, but its great to see a writeup and I loved that Paletton link in particular.



I would also like to mention Open-colors https://yeun.github.io/open-color



Lots of good advice in that article, but I think the simplest advice is: for categorical data, just use tableau10.



When it comes to data visualization, I appreciate actually being able to see the data, but many of the "better" examples make it more difficult to discern between the different colors. Higher contrast, please. Beauty is subject to the eye of the beholder, but I certainly hope the data aren't.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: