# Using color variable in TikZ before they are declared

I want to use the color of a path to set the color of the nodes. But I want the nodes to be lighter than the path color. And I want to do this before knowing what the path color will be. Hence, how do i get what will be active path color, so that I can adjust the node color?

-
Could you give a hypothetical example of what you'd like to be able to write? I'm finding it hard to envision a case where the node does not know the colour of the path that it is on. –  Loop Space May 5 '11 at 12:31
@Andrew: if the color is declared (then changed) in a style, the \draw[style] command may not know what color that is. –  Matthew Leingang May 5 '11 at 17:27
@Matthew: I was thinking of hacking in to the lower level code and having the node look at the macro that holds the path's colour. –  Loop Space May 5 '11 at 18:20

TikZ/PGF uses xcolor to store and manipulate color values. With xcolor the current color is always available as .. So, you can write

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[red!50!blue]

@Matthew: Also have a look on \blendcolors. You might find it also very useful. However IIRC it doesn't work for the current color just for subsequent ones. –  Martin Scharrer May 5 '11 at 18:29