8
$\begingroup$

Where is there a list or information on all the colours that can be rendered on Math StackExchange with $\color{...}$? I thought that http://en.wikibooks.org/wiki/LaTeX/Colors was the answer but some colours there do not appear to be supported here.

For example, $\color{BurntOrange}{\text{BurntOrange}}$ does not work but $\color{yellowgreen}{\text{YellowGreen does.}}$

$\endgroup$
10
  • 3
    $\begingroup$ Black should be enough. Blue and red if you insist. YellowGreen is nearly invisible and makes my eyes hurt a lot. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 11:26
  • 1
    $\begingroup$ @AsafKaragila You should follow the Handicap living SE proposal and post a couple of questions; colorblindness was mentioned before there. area51.stackexchange.com/proposals/57545/… $\endgroup$ Commented Jul 17, 2013 at 13:28
  • $\begingroup$ @Brian: Thanks, but no thanks. I have a one community limit, and right now I am a member of two - which is only possibl because of the large intersection of them. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 13:39
  • $\begingroup$ Maybe that's why it's called Mathoverflow... $\endgroup$ Commented Jul 17, 2013 at 15:44
  • $\begingroup$ @Asaf. Cyan is even worse to my eyes than YellowGreen. $\endgroup$ Commented Jul 17, 2013 at 16:06
  • $\begingroup$ @Rick: I agree. All those "pale blue" shades are really just white. Once when I was in the army I was asked to make a colored spreadsheet in excel, adhering a usual coloring scheme (which I had only seen in print). When they saw the result they asked someone else to do it instead, and I was never asked to do things related to color ever again. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 16:16
  • $\begingroup$ @Asaf. Heh. Electronic spreadsheets hadn't been invented when I was in the army. $\endgroup$ Commented Jul 17, 2013 at 16:26
  • $\begingroup$ @Rick: I have a general feeling that you and I had a very different army service in two very different countries. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 16:26
  • $\begingroup$ @Asaf. Yeah, those muzzle-loading muskets we were issued were really heavy to carry around all day. $\endgroup$ Commented Jul 17, 2013 at 16:34
  • $\begingroup$ @Rick: As long as you're not Connor MacLeod, I think that you're going too far with this joke... ;-) $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 16:45

3 Answers 3

11
$\begingroup$

It turns out that there are two implementation of \color in MathJax. The built-in version is based on HTML colors, so this is partly browser dependent (as some browsers define additional names like those from the X11 named colors). You can also use RGB color specifications like #CF8 or #C8F280.

The other implementation is the one in the color extension, which provides a more LaTeX-compatible version. This is the one whose documentation Willie Wong cited, but it is not the default version of \color. For that, you would have to use \require{color} here, since it is not included in the MSE configuration for MathJax.

$\endgroup$
4
  • $\begingroup$ Perhaps, if so, it's worth asking for \require{color} to be active on MSE. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 22:26
  • $\begingroup$ Argh... perhaps one should make a note here that \color does not in fact require the color extension... $\endgroup$
    – Willie Wong Mod
    Commented Jul 18, 2013 at 7:56
  • $\begingroup$ @AsafKaragila: why? I thought you hate colors. $\endgroup$
    – Willie Wong Mod
    Commented Jul 30, 2013 at 8:07
  • $\begingroup$ @Willie: I do. And my immense collection of plain black t-shirts is a witness of that (my only white shirt is the one I got from this site, actually. I never wore it...). However, using a color package will allow me to at least know the name of the colors by looking at the source code. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 30, 2013 at 8:16
6
$\begingroup$

You can use the RGB color model: $\color{#CF5300}{\text{BurntOrange}}$ is CF5300. It's not entirely clear, though, that MathJax isn't compressing some colors behind the scenes, since I experimented with some RGB colors and didn't get the results I expected to see. This is a moot point, though, since as Asaf and I have been saying for a while, one should use color here very sparingly, if at all.

$\endgroup$
10
  • 1
    $\begingroup$ $\color{#C000FF}{\text{Good }}\color{#00A0FF}{\text{point}}\text{; }\color{#C00000}{\text{I }}\color{#00A000}{\text{couldn't }}\color{#0000FF}{\text{agree }}\color{#C0A000}{\text{more}}\text{.}$ :-) $\endgroup$
    – robjohn Mod
    Commented Jul 17, 2013 at 16:27
  • 1
    $\begingroup$ @robjohn:$\vphantom{I think this color is the best color. If anything.}$ $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 16:30
  • $\begingroup$ @AsafKaragila: if you right-click on the timestamp for your last comment, does the contextual menu that allows you to copy the comment URL appear, or the contextual menu to get the MathJax source? $\endgroup$
    – robjohn Mod
    Commented Jul 17, 2013 at 17:13
  • $\begingroup$ @robjohn. I see what you're getting at. Interesting. $\endgroup$ Commented Jul 17, 2013 at 17:25
  • $\begingroup$ @robjohn Besides the timestamp, Asaf's name is also not a hyperlink in that comment. (Left click does nothing for me) $\endgroup$
    – 40 votes
    Commented Jul 17, 2013 at 18:42
  • $\begingroup$ @40votes The same phenomenon appears in this comment. Note that the long hidden text in Asaf's comment allows you to scroll the Q/A part of the page quite far to the right, so apparently mathjax's \vphantom allocates horizontal white space before suppressing it. $\endgroup$
    – Martin
    Commented Jul 17, 2013 at 19:26
  • $\begingroup$ @Martin At first it looks like a way to post anonymous comments (if your displayed username isn't unique; e.g., there are multiple Martins). Thankfully, the anonymity isn't real: disabling Javascript restores the links, and there are other ways to link comments to their authors. $\endgroup$
    – 40 votes
    Commented Jul 17, 2013 at 19:31
  • $\begingroup$ @Martin: In that linked comment I wrote it this way particularly with quid in mind, as someone who doesn't compile MathJax, so he would be able to read my comment clearly as possible. On the other hand, I wanted to show support of Andres Caicedo and the point of using MathJax to generate whitespace. $\endgroup$
    – Asaf Karagila Mod
    Commented Jul 17, 2013 at 22:04
  • $\begingroup$ Another way to hide the space reserved by MathJax for the vphantomized text is to right-click on the affected area and choose "Math Settings > Scale All Math..." then enter 1%. To restore, simply right-click on a shrunken bit of MathJax and set the scale back to 100%. $\endgroup$
    – robjohn Mod
    Commented Jul 18, 2013 at 17:46
  • $\begingroup$ @RickDecker: Thank you. The website does not allow multiple answers, so I have upvoted. $\endgroup$
    – user53259
    Commented Jul 30, 2013 at 8:04
5
$\begingroup$

This should be filed as a bug against MathJax or its documentation. (I'd do it, but I don't like to use colors and so can't be bothered to register for GitHub just for this.)

The documentation implies (to me) that the 68 predefined colors are included. Those colors are given in this list. So BurntOrange should be available.

$\endgroup$
1
  • $\begingroup$ Thank you. The website does not allow multiple answers, so I have upvoted. $\endgroup$
    – user53259
    Commented Jul 30, 2013 at 8:03

You must log in to answer this question.