Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
@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

1 Answer 1

up vote 13 down vote accepted

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.

share|improve this answer
5  
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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