I'm using xcolor quite extensively through my project. I've also used quite a lot of green and red in close proximity due to their connotations with good and bad.

Now, I realise that this isn't ideal for people with deuteranomaly. However, I think the ease of understanding given by the red/green colour coding makes it useful enough to keep for the majority.

However, I want my work to be as accessible as possible to everyone. So, if I can, I'd also like to publish a separate version with a different colour-space. Is there any way to do this without going throug my whole document and changing all of the colours I've used manually? Perhaps something for xcolor that's akin to the "colour blind mode" found in a lot of games that just remap the referenced colours?

  • 1
    I would define colors semantically, for example \definecolor{primarycolor}{named}{cyan}, and only use these color names throughout the document. Then, it is easy to replace one color by another by just changing one line in the preamble. Of course, you still would need to check for accessibility of the chosen color(s). And, of course, this approach would not work for pictures you include. Mar 17, 2023 at 1:18
  • ...or via \colorlet (\colorlet{primaryA}{red!20!black}, \colorlet{primaryB}{green!30!black}, ...) which can be redefined as needed.
    – Werner
    Mar 17, 2023 at 1:58
  • These are sensible approaches, is there a way to redefine what red is document wide? Would save me having to change what's already there in the content Mar 17, 2023 at 2:23
  • 1
    @ScottishTapWater You can redefine red \colorlet{red}{cyan} (but note that this will also change all colours for which you used red in mixing them) Mar 17, 2023 at 9:40


You must log in to answer this question.

Browse other questions tagged .