27
$\begingroup$

I've noticed that though there is a way to color text or equations, in mathjax, though very few users use it. On the otherhand, those who do, use it regularly.

To me, coloring seems a nice way to remove the barrier that digital or printed text entails - in a class, a professor might show with their hands physically how something is moved from one step to another, (for example how certain terms might cancel, or how some terms might be rearranged to yield a more fruitful representation) whereas this is difficult to implement in text.

Coloring often removes this restriction. Similarly colored parts of the equation might suggest some relation between the two, like simplification, or approximation of one by the other. Another use might be to highlight a part of a proof or derivation which deserves special attention, or has some things to note about, later in the post. (As opposed to tagging equations, color can be used to target specific expressions, instead of a whole equation)

Keeping in mind all this, is it bad practice to use color in answers? Especially equations?

$\endgroup$
23
  • 3
    $\begingroup$ Related: meta.math.stackexchange.com/questions/4195/… $\endgroup$
    – Asaf Karagila Mod
    May 3, 2016 at 9:52
  • 2
    $\begingroup$ @AsafKaragila Already seen it, but that post was more of why use of color shouldn't be stopped by those who use it. On the other hand, I want to know why more people don't and, as a result, what negative aspects (if any) it might have. $\endgroup$
    – Aritra Das
    May 3, 2016 at 9:54
  • 4
    $\begingroup$ One negative aspect is that it makes it harder for some people to read the text, and that if done excessively it will probably be distracting or a cause for a headache for non-color blinds as well. $\endgroup$
    – Asaf Karagila Mod
    May 3, 2016 at 9:55
  • 33
    $\begingroup$ I'm not colour blind, but I generally find that using colours decreases readability a lot. Occasionally, using colour to emphasise a particular term or symbol is helpful, but in my opinion colour should be used very sparingly. $\endgroup$ May 3, 2016 at 11:26
  • 2
    $\begingroup$ Perhaps promoting it would mean a flood of posts here in Meta about how to do colors? $\endgroup$
    – GEdgar
    May 3, 2016 at 12:22
  • 4
    $\begingroup$ Both. Some colours are of course difficult to read on their own, but even when the individual colours would be easy to read, the combination of several of them in close proximity makes it hard to read for me. I can't switch from "this colour is important" to "now it's that" quickly. And lots of colours together look like an image, not like text. $\endgroup$ May 3, 2016 at 13:46
  • 11
    $\begingroup$ I often use colors and my experience is that it proves very helpful to many readers, e.g. it has significantly decreased the number of questions on my answers. $\endgroup$ May 3, 2016 at 16:12
  • 7
    $\begingroup$ @Bill But you also happen to be one of those who put a lot of thought into how to use the colours, so they are used effectively. Not that many do so unfortunately. $\endgroup$ May 3, 2016 at 17:59
  • 4
    $\begingroup$ @TobiasKildetoft Now that you said it, I'm curious as to what an overuse or mindless use of color really looks like. Do you have any links? $\endgroup$
    – Aritra Das
    May 3, 2016 at 19:41
  • 1
    $\begingroup$ A simple example of a not necessary, in my opinion at least, use that is not infrequent is to set a (unique) displayed equation in a different color. Like, this is an important equation $$\color{red}{ e^{i\pi }+ 1=0.}$$ But really what is the point of that added emphasis? Would it be an less noticed where it in the color of the text. $\endgroup$
    – quid Mod
    May 3, 2016 at 23:35
  • 6
    $\begingroup$ I think it's probably best to use it when you can tell the asker is someone who might not necessarily understand expressions like "collect like terms" or "rewriting". $\endgroup$ May 4, 2016 at 0:44
  • 6
    $\begingroup$ The main trouble with colors is that they're not semantically meaningful - this means that one can't parse it to any other sort of output easily (e.g. users using screen readers might have difficulty) and that it is easy to use in a way that doesn't convey meaning. (As opposed to things like underbraces or strikethroughs, which are both more typographical features than mathematical notations, but which have the more clear meanings of indicating groupings and cancellations). This isn't an argument against using colors, but should, as other have noted, call for caution about them. $\endgroup$ May 4, 2016 at 1:48
  • 7
    $\begingroup$ @Milo One could say the same about most mathematical notation. It is highly overloaded / ambiguous and to infer a unique denotation often requires the reader to infer things based on context, etc. But that doesn't stop competent mathematical authors from using such overloaded / ambiguous notation in a way that is comprehensible to competent readers. Exactly the same holds true for colored notation. $\endgroup$ May 5, 2016 at 14:59
  • 3
    $\begingroup$ Here is an example of a question where I have no idea why the colors are even remotely helpful. math.stackexchange.com/questions/1773493/… $\endgroup$
    – Asaf Karagila Mod
    May 7, 2016 at 12:40
  • 2
    $\begingroup$ So, how about we ask what colors should be used in equations so that both Daltonists and normals can equally enjoy the benefits of the highlighting? $\endgroup$ May 12, 2016 at 2:51

4 Answers 4

22
$\begingroup$

(I'm a new user so I don't have anything to contribute as far as norms here go, but I'm really interested in how to effectively convey information in an accessible way!)

Like others have said, the most obvious downside is colorblind people and people using screen readers. Colorblind people will miss information and so you should make sure the color doesn't convey anything essential, like it does in the Fourier Transform jaska posted.

Adding color may make it harder for people with screen readers to parse the rest of the equation as well. I know some people with screen readers read the TeX source, and using a lot of color will make a complete mess of something that would otherwise be comprehensible. I don't know how the screenreaders that have math support render color, but if it's including it, it will probably make it harder to understand.

To some extent, you'd run into the same screenreader issue with bold and italics. From a google it looks like the ones that have math support do read it, but it would be a less frequent intrusion than some uses of color. If the TeX source is being read, I imagine \mathbf would be less disruptive than \color{#c00}.

But using color can really help people with learning disabilities or who are just daunted by big equations. You can do things with it that you just can't do with bolding, italics, or underlining, and I think it's often much easier to make sense of in an equation.

The other potential downside is that color controls your reader's attention, and you'll send them towards wrong things if you don't use it in a thoughtful way.

After looking at some of Bill Dubuque's posts, I wanted to point out some examples of things I consider really effective uses of color. Like this:

This is a special case of telescopy. For as below we can write the RHS as a product of its term ratios $$\rm\ g(n)\ =\ \frac{g(n)}{\color{#c00}{g(n-1)}}\ \frac{\color{#c00}{g(n-1)}}{\color{#0a0}{g(n-2)}}\ \frac{\color{#0a0}{g(n-2)}}{\cdots }\ \cdots\ \frac{\cdots}{\color{brown}{g(3)}}\ \frac{\color{brown}{g(3)}}{\color{blue}{g(2)}}\ \frac{\color{blue}{g(2)}}{1}$$

Or this:

[Q: Is there an elementary proof that $\sum \limits_{k=1}^n \frac1k$ is never an integer?]

Hint $\ $ Since there is a unique denominator $\rm\:\color{#C00} {2^K}\:$ having maximal power of $2,\,$ upon multiplying all terms through by $\rm\:2^{K-1}$ one deduces the contradiction that $\rm\ 1/2\, =\, c/d \;$ with $\rm\: d \:$ odd, $ $ e.g.

$$\begin{eqnarray} & &\rm\ \ \ \ \color{green}{m} &=&\ \ 1 &+& \frac{1}{2} &+& \frac{1}{3} &+&\, \color{#C00}{\frac{1}{4}} &+& \frac{1}{5} &+& \frac{1}{6} &+& \frac{1}{7} \\ &\Rightarrow\ &\rm\ \ \color{green}{2m} &=&\ \ 2 &+&\ 1 &+& \frac{2}{3} &+&\, \color{#C00}{\frac{1}{2}} &+& \frac{2}{5} &+& \frac{1}{3} &+& \frac{2}{7}^\phantom{M^M}\\ &\Rightarrow\ & -\color{#C00}{\frac{1}{2}}\ \ &=&\ \ 2 &+&\ 1 &+& \frac{2}{3} &-&\rm \color{green}{2m} &+& \frac{2}{5} &+& \frac{1}{3} &+& \frac{2}{7}^\phantom{M^M} \end{eqnarray}$$

The prior sum has all odd denominators so reduces to a fraction with odd denominator $\rm\,d\, |\, 3\cdot 5\cdot 7$.

The color completely commands your attention. When I look at the equation in the first example, I don't read it left to right. The first thing I see is the pattern, and then I read out from there. In the second example, I'm trying to match the colors up before I've really read the text.

It works in Bill's posts because understanding how the colored things are connected is central to understanding the post—the color directs your attention right where it needs to go, and you quickly see what he's trying to show you. But if it didn't draw you to the right place, or if wasn't clear what it was supposed to show, you'd be distracted and confused before you even fully read the text. If you're not positive that color will lead your reader in the right direction, it's probably best to avoid it.

Another use might be to highlight a part of a proof or derivation which deserves special attention, or has some things to note about, later in the post.

I think the latter would be a mistake. The reader should understand why there's color as they're reading the proof. It's too prominent to expect a reader to just keep going until you see fit to explain.

$\endgroup$
35
  • 5
    $\begingroup$ In the first example I honestly do not see what the color brings to the table. Each $g(n-k)$ is immediately next to its twin, you don't need color to see that they go in pairs... And for the second proof the only reason color is used is useful is because the author decided for unknown reasons to put the $-2m$ in the middle of all the other terms. Why...? $\endgroup$ May 9, 2016 at 5:58
  • 2
    $\begingroup$ @Arita Das: One can also use boxes, underlines, boldface fonts, or a myriad of other designs and not color. Do you think a color is more prominent than a box around the relevant variable? $\endgroup$
    – Asaf Karagila Mod
    May 9, 2016 at 9:22
  • 4
    $\begingroup$ Here is the second example without any kind of visual highlighting. I think it's just as effective as color... $\endgroup$ May 9, 2016 at 12:18
  • 2
    $\begingroup$ @AsafKaragila Because colors work well on emphasizing multiple different things in a few lines of math and is easy to do with $LaTeX$ to me. $\endgroup$ May 11, 2016 at 11:30
  • 2
    $\begingroup$ @AsafKaragila But I've never seen anyone ever use something like that. Plus, it seems limited in the amount of things you can emphasize in one line of text, and it is difficult to connect parts like you can by connecting parts with the same color. $\endgroup$ May 11, 2016 at 11:47
  • 2
    $\begingroup$ @SimpleArt Behold. $\endgroup$ May 11, 2016 at 17:34
  • 6
    $\begingroup$ @AsafKaragila I have to admit I find this disagreement really strange. You're colorblind, right? Why do you think you know what's effective for non-colorblind people better than they do? Color is enormously salient for me in a way that far surpasses boxes, underlining, etc. Those are just more vertical and horizontal lines, the same things the rest of the equation is made out of. Color uses a whole different quality to make a distinction. Bolding & fonts don't link separate parts together, and sometimes don't show up that well. There really are things you can only do with color. $\endgroup$
    – Hungry
    May 11, 2016 at 21:43
  • 4
    $\begingroup$ @hungry Au contraire, color can be a very effective tool for semantically connecting fragments of a proof e.g. for connecting a prior-derived equation to a a later application as a rewrite rule (esp. if that use is in a context which greatly obfuscates such). $\endgroup$ May 11, 2016 at 21:57
  • 4
    $\begingroup$ @Hungry: Why do you find it strange? Do you find it strange when people use "she" for abstract third-person statements? Do you find it strange when minorities try to promote more acceptance and more tolerance to them? If you don't find these things strange, you shouldn't find color-blinded people pushing for better alternatives strange either. If you find all those things strange, then perhaps it's time to take another look at the world you're living in. $\endgroup$
    – Asaf Karagila Mod
    May 11, 2016 at 23:09
  • 3
    $\begingroup$ @Hungry: I never said that color is never clearer for anyone. I repeatedly say that I understand why color is clearer for some people, and in some dosage and choice of colors it can even be clearer for me. I don't understand why you seem to be so perplexed with someone trying to push for a more inclusive approach, though. But I am not going to continue this discussion, since it seems to be going nowhere. If you don't want to understand what I'm saying, that's your problem. $\endgroup$
    – Asaf Karagila Mod
    May 11, 2016 at 23:42
  • 4
    $\begingroup$ @AsafKaragila As people keep telling you, not using color is not a "more inclusive approach," full stop. It is an approach that is more inclusive of people that are color blind and less inclusive of people with learning disabilities. I have dyscalculia, and color very clearly helps me in a way that none of your alternatives do. $\endgroup$
    – Hungry
    May 11, 2016 at 23:46
  • 5
    $\begingroup$ There are a large number of users that see colors just fine that said too it is often a distraction and a nuissance, when used too much. For the specific example by @BillDubuque, the highlighting of the negative power of two is good but could have been achieved just as well if not better with a box. (But, okay, let it be colored red.) Yet the handling of the $m$ is in my opinion worse with the color than it would be without. $\endgroup$
    – quid Mod
    May 12, 2016 at 0:00
  • 6
    $\begingroup$ @BillDubuque I agree that the use of colors likely can get one some extra upvotes. Maybe if you include a funny picture you can get it over 200. $\endgroup$
    – quid Mod
    May 12, 2016 at 7:12
  • 5
    $\begingroup$ @quid Yet another cheap shot. Just in case you really do not understand, let me elaborate. I use colors in order to make mathematics more comprehensible - not to "get some extra upvotes". I couldn't care less about the votes. $\endgroup$ May 12, 2016 at 13:51
  • 4
    $\begingroup$ @quid Again, please stay on topic and constructive. My choice of coloring is often motivated by the desire to help beginners get past what I've observed to be common stumbling blocks ( e.g. those posed by algebraic manipulations) so that they don't lose sight of the forest for the trees(algebra). So I'm not surprised that you might not appreciate that choice, since you are long past those stumbling blocks. But, as I said, there are better examples. $\endgroup$ May 12, 2016 at 15:51
10
$\begingroup$

(I've never used Meta before -- I noted there's no answer yet, but a lot of comments, so I hope I'm not doing something wrong)

To first give an example of what I would consider good coloring; I like the explanation of Fourier Transform, on betterexplained and technically copied from altdevblogaday):


enter image description here


To be fair, he could have made it a little easier for colorblind people (like myself - and that's something else you need to keep in mind). And therein lies the issue. While this is one of the best examples of a color-coded equation I can think of, there are immediate "bad" consequences:

  • Hard for colorblind people to distinguish
  • Still somewhat reduces readability
  • Doesn't emphasize if a part of the equation is "more important" than another

Anyways, it's hard to tell when an equation would be better with color, and that's totally up to your discretion when you post an answer. However, I usually would recommend to err on the side of "no color". As mentioned in the comments, colors can be distracting, and should be used to emphasize the part of the equation you're looking at, rather than splitting it into pieces.

I think that it's just as easy to go ahead and explain with words, since you're likely to do that anyways. Pretty colors are no substitute for a lucid explanation.

A good example of readable (but lacking in content) labeling below.


enter image description here

$\endgroup$
11
  • 38
    $\begingroup$ Your first example makes my eyes bleed and I'm not convinced that the second one benefits from colour at all. (It's not harmed by colour but it doesn't seem to be bringing much to the party.) $\endgroup$ May 7, 2016 at 5:07
  • $\begingroup$ I probably should have made it more clear that I don't really like the first one, it's just the best I've seen of a handful of really bad equation colorings. :-P $\endgroup$
    – user199076
    May 7, 2016 at 6:11
  • 8
    $\begingroup$ I actually really like the first one. It makes it so much faster for me to interpret. On first glance I was like "woah that looks ridiculous" and two seconds later I completely understand what every component represented. $\endgroup$
    – Prince M
    May 7, 2016 at 7:49
  • $\begingroup$ @PrinceM Same for me. Knowing exactly which part of the equation corresponds to what, without having to explicitly mention it, is I think, why color should always be used. $\endgroup$
    – Aritra Das
    May 7, 2016 at 7:58
  • 4
    $\begingroup$ This is actually the first time I have seen something like this. But, if I would have seen that same expression written in all black or just with some pieces bold I would have been like "thats going to take me twenty minutes to figure out what's going on, Im not reading that" $\endgroup$
    – Prince M
    May 7, 2016 at 8:01
  • 21
    $\begingroup$ Your two examples are prime examples of why using color is bad. In the first one, the equation looks like a disco party, pretty much all the letters have a different color, and if you want to know what the color means you need to read the legend anyway. So why not just rewrite the symbols in the legend? As in "$X_n$: energy; $x_n$: signal", and so on. Some of the info is useless (if you don't know yet that $e^{2i\pi \dots}$ is "spinning around" then reading this equation is useless for you). In the second example, color provides no information whatsoever. $\endgroup$ May 7, 2016 at 13:08
  • 2
    $\begingroup$ Whoever made the first example didn't think about color blinded people. I find it very hard to match the colors from the text to the equation, and I know that the main reason I probably got it right is that I can guess the context for everything in that equation. $\endgroup$
    – Asaf Karagila Mod
    May 7, 2016 at 15:26
  • 4
    $\begingroup$ Concluding "color is bad" from an example that includes seven (!) colors seems a little hasty. It's a lot, but it's still much quicker for me to parse the color legend than a written legend. More than legends, though, I think this kind of thing is the best use of color—no essential information depends on it, but it helps readers immediately see the pattern in the equation. $\endgroup$
    – Hungry
    May 9, 2016 at 3:58
  • $\begingroup$ I find the first equation to be difficult to read with all those colors, but perhaps I'm negatively inclined because I already know how the equation is organized already. For those who don't already understand how it's put together, the color could be helpful, although I would recommend that it be put in as a kind of footnote, if possible (unless the only point of the question was to understand how the equation was put together). $\endgroup$
    – Brian Tung
    May 10, 2016 at 18:43
  • 5
    $\begingroup$ I am all for the first example. At first glance, it looks seriously ugly. But once you start reading it element for element, it is immensely helpful to have the grouping and association provided by color (notice how the magenta "n"s appear at both the sum sign and in the exponent - you couldn't group the efficiently in another way) and it becomes essential for understanding. Sure, a seasoned mathematician who also knows about Fourier would not need it. A student who stands in front of that formula and doesn't know where to start profits a lot from that use of color, aesthetics be damned. $\endgroup$
    – rumtscho
    May 10, 2016 at 18:53
  • 4
    $\begingroup$ (cont.) and defining the symbols in the legend would not have the same effect at all. I have the feeling that most people writing in this thread forget a very basic principle of usability: there is no "one size fits all" representation. Depending on your information need and the type of cognitive processing you need to do, the optimal representation can vary a lot. And it can turn out that for some goals, the optimal representation looks seriously untidy and overwhelming at first glance. That's OK, as long as it serves its purpose once you stop trying to take all in at once. $\endgroup$
    – rumtscho
    May 10, 2016 at 18:56
4
$\begingroup$

Sometimes coloring is the best way to show how one step relates to the next or how different parts of one line are related, usually in a telescoping manner.

$$\sum_{n=1}^\infty\left(\frac1n-\frac1{n+1}\right)=\left(\frac11-\color{red}{\frac12}\right)+\left(\color{red}{\frac12}-\color{blue}{\frac13}\right)+\left(\color{blue}{\frac13}+\dots\right)$$

I think that using colors like this helps students understand telescoping series very well. Simply stating why a telescoping series works the way it does may not snap very fast for some students.

Another example is to help with equating parts, as Euler did to solve the Basel Problem.

$$\frac{\sin(x)}x=\dots-\color{green}{\frac1{\pi^2}\left(\frac1{1^2}+\frac1{2^2}+\frac1{3^2}\dots\right)}\color{red}{x^2}\dots=1-\color{green}{\frac16}\color{red}{x^2}+\frac1{120}x^4-\dots$$

$$\implies\frac1{\pi^2}\left(\frac1{1^2}+\frac1{2^2}+\frac1{3^2}\dots\right)=\frac16$$

Students again may have difficulty seeing that you can simply set those two equal if you don't point out that they have the same $x$ term.

Also, colors are much more visual, and if you ask around on the matheducator's SE site, you'll find that visuals can be extremely helpful to students.

Of course, there are some setbacks, like the fact that staring at colors could put strain on your eyes, but I think it may be worth it, depending on the problem and who you are trying to present your answer to.

$\endgroup$
1
  • 7
    $\begingroup$ Pairing green and red is especially cruel, as it is the most common color blindness. Me personally, I see the red almost as black in some letters (e.g. the first equation, I had to check the source to see it's not black), but its pairing with green causes an additional eyestrain. $\endgroup$
    – Asaf Karagila Mod
    May 11, 2016 at 15:32
4
$\begingroup$

A BBC News article Revision techniques - the good, the OK and the useless, mentioned by the recent Guardian's article The science of revision: nine ways pupils can revise for exams more effectively, might be related. Using highlighters (colours) would be bad as it would break up ideas into components and therefore break down the 'chain of thought'. People would be more likely to work things out - make brain connections - when everything is 'normal'. Therefore, it would make sense for equations and such to be left as they normally are and not to link them colour-wise.

Following on from this research, I infer that ANY method of isolation or categorisation of terms / ideas would be, in fact, contributing to the 'breakdown of chain of thought' and therefore not beneficial. This is just another idea, on top of the obvious colour-blindness issues.

$\endgroup$
9
  • 2
    $\begingroup$ Utter nonsense. Your conclusions are absurd esp, when applied to mathematical text. But nowadays one can find "studies" on the web that "support" almost any viewpoint. Most likely none of these studies considered the complicated structures often encountered in higher-level mathematical expositions, and that none of the authors have any experience teaching higher-level mathematics (esp. online, as here). Some of our users have a few decades experience teaching online. We are the experts. $\endgroup$ May 12, 2016 at 14:51
  • 4
    $\begingroup$ Oh bother. I know I said I wasn't going to speak to you, but this is too much. Here is the paper @BillDubuque. As you can see it is a review of several studies, published in a seemingly reputable journal. It mentions the words "math" and "science" many, many times. But well, I'm sure you know better. Oh how I wish you'd remained inactive, meta was way more pleasant. $\endgroup$ May 12, 2016 at 14:55
  • 4
    $\begingroup$ @Najib The definition of "highlighting" in that paper is "marking potentially important portions of to-be-relearned materials while reading". That simple use does not apply to the many different uses of highlighting that we employ here (esp. uses that have specific mathematical semantics). In fact I don't recall once ever using color for that purpose in any of my (> 1100) colored answers. $\endgroup$ May 12, 2016 at 15:04
  • 2
    $\begingroup$ So the cited study does not seem to pertain to the use of color on this site, which comes as no surprise to any mathematician who has successfully used such color highlighting in expositions - as many have here. $\endgroup$ May 13, 2016 at 21:35
  • 3
    $\begingroup$ @BillDubuque That is but a matter of opinion. No one here is commenting on anyone's credential's but, in actuality, the ones with little experience are the ones who need to be stating their opinions. This is because they will be the ones wanting to revise etc. and would give more credible responses as to which method is best suited. So far sufficient evidence has been provided to support my stance, but you're adamant that you're the expert. Again, a matter of opinion - completely subjective. $\endgroup$ May 18, 2016 at 9:20
  • $\begingroup$ @Victor As I made perfectly clear, the cited study does not apply to the use of color on this site. So your post has little relevance to the topic at hand. Given that you've never used this site before, it's not surprising that you are not familiar with the diverse ways that color is used here. $\endgroup$ May 18, 2016 at 14:32
  • 1
    $\begingroup$ @BillDubuque I still stand by my statement that it is a matter of opinion. Personally, I find it more helpful to not have colour isolating specific terms - I like seeing things 'intact'. Anyways, I guess neither of us are right or wrong. Cheers! $\endgroup$ May 19, 2016 at 13:06
  • $\begingroup$ @VictorIam Yes, your answer is nothing more than a personal opinion due to the multiple non sequitur inferences employed. In particular, the studies that you claim support your opinion do not apply here - as I made clear above. $\endgroup$ May 19, 2016 at 15:32
  • $\begingroup$ @Vic Btw, even if we did use color mostly for such highlighting i.e. "marking potentially important portions of to-be-relearned materials while reading", there would still be valid arguments against the applicability of the studies that you cite. For example, they consider only highlighting authored by students who are studying for exams, not highlighting authored by expert teachers. While it may be true that students may confuse themselves by highlighting inessential matters, that is far less likely to occur by expert teachers - who know well from experience which points deserve emphasis. $\endgroup$ May 20, 2016 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .