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$
  • 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 Jul 17 '13 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$ – Brian Rushton Jul 17 '13 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 Jul 17 '13 at 13:39
  • $\begingroup$ Maybe that's why it's called Mathoverflow... $\endgroup$ – Brian Rushton Jul 17 '13 at 15:44
  • $\begingroup$ @Asaf. Cyan is even worse to my eyes than YellowGreen. $\endgroup$ – Rick Decker Jul 17 '13 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 Jul 17 '13 at 16:16
  • $\begingroup$ @Asaf. Heh. Electronic spreadsheets hadn't been invented when I was in the army. $\endgroup$ – Rick Decker Jul 17 '13 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 Jul 17 '13 at 16:26
  • $\begingroup$ @Asaf. Yeah, those muzzle-loading muskets we were issued were really heavy to carry around all day. $\endgroup$ – Rick Decker Jul 17 '13 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 Jul 17 '13 at 16:45
13
$\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$
  • $\begingroup$ Perhaps, if so, it's worth asking for \require{color} to be active on MSE. $\endgroup$ – Asaf Karagila Jul 17 '13 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 Jul 18 '13 at 7:56
  • $\begingroup$ @AsafKaragila: why? I thought you hate colors. $\endgroup$ – Willie Wong Jul 30 '13 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 Jul 30 '13 at 8:16
7
$\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$
  • 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 Jul 17 '13 at 16:27
  • 1
    $\begingroup$ @robjohn:$\vphantom{I think this color is the best color. If anything.}$ $\endgroup$ – Asaf Karagila Jul 17 '13 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 Jul 17 '13 at 17:13
  • $\begingroup$ @robjohn. I see what you're getting at. Interesting. $\endgroup$ – Rick Decker Jul 17 '13 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 Jul 17 '13 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 Jul 17 '13 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 Jul 17 '13 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 Jul 17 '13 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 Jul 18 '13 at 17:46
  • $\begingroup$ @RickDecker: Thank you. The website does not allow multiple answers, so I have upvoted. $\endgroup$ – Greek - Area 51 Proposal Jul 30 '13 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$
  • $\begingroup$ Thank you. The website does not allow multiple answers, so I have upvoted. $\endgroup$ – Greek - Area 51 Proposal Jul 30 '13 at 8:03

You must log in to answer this question.

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