xcolor
我如何才能获得颜色名称(如svgnames
或)对应的rgb颜色dvipsnames
?
例子:
我如何将 转换svgnames
为其DarkGreen
对应的 rgb 值?
答案1
答案2
xcolor
一种方法是在文件中直接查找xcolor.dtx
,例如http://mirror.easyname.at/ctan/macros/latex/contrib/xcolor/xcolor.dtx
该文件包含:
%<*svgnames>
\preparecolorset{rgb}{}{}{%
[...]
DarkBlue,0,0,.545;%
DarkCyan,0,.545,.545;%
DarkGoldenrod,.72,.525,.044;%
DarkGray,.664,.664,.664;%
DarkGreen,0,.392,0;% <--- rgb value for DarkGreen
DarkGrey,.664,.664,.664;%
DarkKhaki,.74,.716,.42;%
DarkMagenta,.545,0,.545;%
DarkOliveGreen,.332,.42,.185;%
DarkOrange,1,.55,0;%
DarkOrchid,.6,.196,.8;%
DarkRed,.545,0,0;%
DarkSalmon,.912,.59,.48;%
DarkSeaGreen,.56,.736,.56;%
DarkSlateBlue,.284,.24,.545;%
DarkSlateGray,.185,.31,.31;%
DarkSlateGrey,.185,.31,.31;%
DarkTurquoise,0,.808,.82;%
DarkViolet,.58,0,.828;%
[...]