SBML2TikZ

Home
Download
About Us
Contact Us
Site Map
Changing a Solid Color
Consider the following orange arrow in Figure 6:

Figure 6: an orange arrow

 

We can change the color of the arrow in Figure 6 to a different color, say gray, by changing its "fill" and "outline" arguments. The TeX commands drawing the arrow head looks like:
 
 % Group for J7

\draw[line width = 2pt, color = orange!100, ] (612pt, 623pt) .. controls (613pt, 646pt) and (1109pt, 900pt) .. (522.503974562798pt, 288pt);

{

   \pgftransformshift{\pgfpoint{ 522.504pt }{ 288pt } }

   \pgftransformcm { -0.6919029 }{ -0.7219905 }{ -0.7219905 }{ 0.691903 }{\pgfpoint{ 0pt }{ 0pt } }

   {

      % LineEnding for ATP

      {

         % Polygon for ATP

         \pgftransformshift{\pgfpoint{ -10pt }{ -5pt } }

         \draw [line width = 2pt, color = orange!100, fill = orange!100 ]

         (0pt,0pt)--(10pt,5pt)--(0pt,10pt)--(3.3pt,5pt)--(0pt, 0pt) -- cycle;

      }

   }

}

 
The bolded text above show the fill and color arguments used to draw the arrow. (Which incidentally describes a reaction called "J7" generating a species called "ATP.")  If we wanted to change the color to gray, we can replace all instances of the color argument "orange" to the color argument "gray" (which is another color name PGF/TikZ recognizes).
 
Alternatively, we could define our own color "ThisIsGray"
 
\definecolor{ThisIsGray}{RGB}{131,132,100};
 
and reference it instead of "orange":
 
 % Group for J7

\draw[line width = 2pt, color = ThisIsGray!100, ] (612pt, 623pt) .. controls (613pt, 646pt) and (1109pt, 900pt) .. (522.503974562798pt, 288pt);

{

   \pgftransformshift{\pgfpoint{ 522.504pt }{ 288pt } }

   \pgftransformcm { -0.6919029 }{ -0.7219905 }{ -0.7219905 }{ 0.691903 }{\pgfpoint{ 0pt }{ 0pt } }

   {

      % LineEnding for ATP

      {

         % Polygon for ATP

         \pgftransformshift{\pgfpoint{ -10pt }{ -5pt } }

         \draw [line width = 2pt, color = ThisIsGray!100, fill = ThisIsGray!100 ]

         (0pt,0pt)--(10pt,5pt)--(0pt,10pt)--(3.3pt,5pt)--(0pt, 0pt) -- cycle;

      }

   }

}

 

This creates the desired effect of a gray arrow instead of an orange arrow:

Figure 7: a gray version of FIgure 6

 

Next, we can look at shadings of colors instead of solid colors:

 

Go To Next Page