ケマクロにおける軌道の色の変化

ケマクロにおける軌道の色の変化

これらの軌道の色を変更しようとしています。透明と青の色ではなく、赤と青のみにしたいです。セットアップの色を変更しようとしましたが、赤と透明または青と透明になります。どのように変更すればよいですか?

軌道

\documentclass{general}

\usepackage{chemfig,chemmacros}
\chemsetup{modules=all}

\begin{document}
\setbondoffset{0pt}
  \chemsetup[orbital]{
    overlay ,
    opacity = .75 ,
    p/scale = 1.6 ,
    s/color = blue!50 , %changing to red!50 is no help%
    s/scale = 1.6
  }
  \chemfig{
    -[:-20]\orbital{p}
    (-[:-150])-\orbital{p}
}
\end{document}

答え1

パッケージのデフォルトは白黒になっているようで、唯一利用可能なオプションは、青に対して行ったように、上部の黒半分を別の色調に変更することだけです。

しかし、回避策としてパッケージを騙してこれを生成することはできる。

ここに画像の説明を入力してください

パッケージ定義を再定義することなく(確かにそれは場当たり的なものだ

\documentclass[a5paper]{report}
% \documentclass{general} % I do not have a general.sty
\usepackage{chemfig,chemmacros}
\chemsetup{modules=all}

\begin{document}
\setbondoffset{0pt}
 \chemsetup[orbital]{
    overlay ,
    opacity = .75 ,
    p/color = blue!50 , %setting black to another color%
    p/scale = 1.6
}
  \chemfig{
    -[:-20]{\orbital[phase=-]{p}}{\orbital[half,color=red!75]{p}} %Note a half does not work well inverted so invert p
    (-[:-150])-{\orbital[phase=-]{p}}{\orbital[half,color=red!75]{p}} % and over-strike white half with red half @75%
}
\hspace{12mm}
{  \chemfig{
    -[:-20]{\orbital[phase=-]{p}}{\orbital[half,color=red!75]{p}} %Note a half does not work well inverted so invert p
    (-[:-150])-{\orbital{p}}{\orbital[half,angle=270,color=red!75]{p}} % and over-strike white half with red half @75%
}
\hspace{12mm}
{  \chemfig{
    -[:-20]{\orbital{p}}{\orbital[half,angle=270,color=red!75]{p}}  %Note a half does not work well inverted so invert p
    (-[:-150])-{\orbital{p}}{\orbital[half,angle=270,color=red!75]{p}} % and over-strike white half with red half @75%
}
\end{document}

関連情報