是什么原因造成同一种颜色出现两种不同的色调?

是什么原因造成同一种颜色出现两种不同的色调?

考虑一下代码

\documentclass[a5paper,12pt,onecolumn,openany,final]{book}
\usepackage[hmargin=0.7in,vmargin=0.75in]{geometry}
\usepackage{xcolor}
\usepackage{pstricks,psvectorian}

\definecolor{darkpurple}{RGB}{48, 25, 52}

\begin{document}
\thispagestyle{empty}

\begin{pspicture}(-5,-5)(5,12)%
\psframe[fillcolor=darkpurple,fillstyle=solid](-5,-5)(5,12)
\end{pspicture}%
\end{document}

当用 编译时xelatex,会产生

在此处输入图片描述

现在,考虑代码(调用与前面的代码相同的颜色)

\documentclass{book}
\textheight 8.5in \textwidth 5.75in 
\usepackage{xcolor}


\definecolor{darkpurple}{RGB}{48, 25, 52}

\usepackage{tikz}
\usetikzlibrary{fadings, calc}
\tikzfading[name=dim fade, inner color=transparent!40, outer color=transparent!100]
\tikzfading[name=bright fade, right color=transparent!100, left color=transparent!100, middle color=transparent!0]
\tikzfading[name=long bright fade, right color=transparent!100, left color=transparent!0]

\newcommand{\glowstar}[3][.5]{\fill[white,path fading=dim fade](#2)circle[radius=#1*.6];
    \foreach \t in {0,60,120}{
    \fill[rotate around={\t:(#2)}, white,path fading=bright fade]($(#2)-(.9*#1,0)$)--($(#2)-(0,.05*#1)$)--($(#2)+(.9*#1,0)$)--($(#2)+(0,.02*#1)$)--cycle;
    \fill[rotate around={\t:(#2)}, white,path fading=long bright fade]($(#2)-(.5*#1,0)$)--($(#2)-(0,.04*#1)$)--($(#2)+(.5*#1,0)$)--($(#2)+(0,.04*#1)$)--cycle;
    }
    \foreach \l [count=\n from 0] in {#3}{
        \fill[rotate around={\n*90:(#2)}, white,path fading=bright fade]($(#2)-(\l*#1,0)$)--($(#2)-(.4,.06*#1)$)--($(#2)+(.4,.06*#1)$)--cycle;
     }        
    \fill[white] (#2)circle[radius=#1*.13];
    }

\begin{document}
\thispagestyle{empty}
\begin{center}
\begin{tikzpicture}
\fill[darkpurple] rectangle (16,12);
\glowstar[1.8]{8,8}{1,1,1,1}% length of left,bottom,right,top
\end{tikzpicture}
\end{center}
\end{document}

使用 进行编译时pdflatex,将产生输出

在此处输入图片描述

但是,当我使用截图工具剪切出一个矩形(包含星星)并将其叠加在pspicture第一个代码生成的图像上时,很容易看出两个代码中使用的“相同”紫色阴影并不完全相同。下图是xelatex使用在线工具截取发光的星星图像并将其插入代码后编译的includegraphics---

在此处输入图片描述

问题:是什么原因导致了这种相同颜色出现两种不同色调的现象?是否产生xelatexpdflatex相同 RGB 颜色的两种不同色调?或者,问题出在我使用的在线截图工具上?

备注:我知道如果我真的想将星形图像强加到第一个 pspicture 上,可以直接编译代码并使用xelatex--- 编译所有内容,但是,我想知道是什么导致了由相同 RGB 公式生成的两种不同色调的紫色。如果我更改颜色,也会发生相同的现象。

谢谢。

相关内容