1

How can I make these arrow shades, for example to blue from white?

\documentclass{article}
\usepackage{chemfig}
\usepackage[version=3]{mhchem}

\begin{document}
\begin{figure}[!htb]
\centering
\scalebox{2}{
\schemestart
\chemfig{@{O1-2}\textcolor{gray}{O}=@{C1-2}\textbf{C}=@{O2-2}\textcolor{gray}{O}}
\schemestop
\chemmove{    
      \draw[blue][shorten <=3pt, shorten >=3pt](O1-2).. controls +(north:1cm) and +(120:1cm).. (C1-2);  
      \draw[blue][shorten <=3pt, shorten >=3pt](O2-2).. controls +(north:1cm) and +(60:1cm).. (C1-2);     
}
}
\end{figure}
\end{document}

enter image description here

1
  • 1
    Here are some ways to accomplish that.
    – user121799
    Commented Apr 19, 2018 at 20:09

2 Answers 2

2

Building upon Sebastiano's answer, one can also apply the path fading option directly to chemfig arrows as shown in the following example:

enter image description here

\documentclass{article}
\usepackage{chemfig}
\usepackage[version=3]{mhchem}
\usetikzlibrary{fadings}

\begin{document}

\begin{figure}[!htb]
\centering
\scalebox{2}{
\schemestart
\chemfig{@{O1-2}\textcolor{gray}{O}=@{C1-2}\textbf{C}=@{O2-2}\textcolor{gray}{O}}
\schemestop
\chemmove{    
      \draw[blue, path fading = west][shorten <=3pt, shorten >=3pt](O1-2).. controls +(north:1cm) and +(120:1cm).. (C1-2);  
      \draw[blue, path fading = east][shorten <=3pt, shorten >=3pt](O2-2).. controls +(north:1cm) and +(60:1cm).. (C1-2);     
}
}
\end{figure}

\end{document}
1

A possible solution with tikz-cd it is very simple to have the arrows shades to blue from white.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd,amsmath}
\usetikzlibrary{fadings}
\begin{document}
\begin{tikzcd}[column sep=.7cm]
\color{gray}{\mathrm{O}}
 \arrow[r, equal, no head] \arrow[r, bend left=49, blue, path fading=west] & \mathbf{C} \arrow[r, no head, equal] & \color{gray}{\mathrm{O}} \arrow[l, bend right=49, blue, path fading=east]
\end{tikzcd}
\end{document}
1
  • 1
    +1. Maybe you want to add, that path fading can also be applied to chemfig arrows. Using \draw[blue, path fading = west][shorten <=3pt, shorten >=3pt](O1-2).. controls +(north:1cm) and +(120:1cm).. (C1-2); ... will result in the following output: i.sstatic.net/YMnc8.png
    – leandriis
    Commented Mar 12, 2019 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .