12

For example, I have color #009b55 (ForestGreen), and I want to get a slightly brighter version of it - #00a85c. Is there a function that can do it for me?

  • @JohnWickerson - but can I use "ForestGreen!20!black" ? – Rogach May 19 '13 at 9:28
  • @JohnWickerson - yes, it seems I can. Thanks! If you'll post that as an answer, I'll accept it. – Rogach May 19 '13 at 9:29
  • An aside: "dimmen" isn't actually an English word. You probably wanted "darken" ;). – John Wickerson May 19 '13 at 10:05
  • 1
    If you got the HTML color value already it’s also possible to use \color[HTML]{00a85c} or \definecolor{MyGreen}{HTML}{00a85c} to define a new color named MyGreen – Tobi May 19 '13 at 10:09
  • 1
    @JohnWickerson - I edited it to darken now. – Rogach May 19 '13 at 13:15
18

If you put

\usepackage[usenames,dvipsnames]{xcolor}

in your preamble, you can write things like

ForestGreen!60!black

to get a colour that is 60% ForestGreen and 40% black. ("Forest Green" is made available through the dvipsnames(reference) option.)

See (TikZ or xcolor) lighten color for a more thorough explanation.

  • 7
    You can also do this with a reference to the current colour, for example \color{blue} Blue \color{.!80!black} Darker – Andrew Kepert May 19 '13 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.