我想在下面的封面中填充小矩形。我的代码没有将颜色淡化为背景颜色。请帮我纠正下面的代码。
\documentclass[12pt,a4paper]{article}
\usepackage[margin=0pt,includefoot=false,marginpar=0mm,a4paper]{geometry}
\usepackage[version=latest]{pgf}
\usepackage{tikz}
\definecolor{mauchinh}{RGB}{1,61,124}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay,line join=round,line cap=round]
\clip (current page.north west) coordinate (A) rectangle (current page.south east) coordinate (C);
\path[fill=mauchinh] (A) rectangle (C);
\path[bottom color=mauchinh,middle color=mauchinh,
top color=white,
fill opacity=0.15,blend mode=screen] (1.5,-4) rectangle +(20,-19);
\path[fill=white!30!mauchinh,fill opacity=0.25,blend mode=screen] (-1,-9) rectangle +(1.25,-4);
\path[left color=mauchinh!80!white,right color=white] (-1,-9) rectangle +(19,1.25pt);
\path[bottom color=mauchinh!80!white,top color=white] (1.5,-4) rectangle +(1.65pt,-19);
\end{tikzpicture}
\end{document}
非常感谢!
答案1
这是一个正在消逝的
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{fadings}
\begin{document}
\thispagestyle{empty}
\definecolor{mauchinh}{RGB}{1,61,124}
\pagecolor{mauchinh}
\begin{tikzpicture}
\fill[color=mauchinh!80!white, path fading=south] (0,0) rectangle +(20,-20);
\end{tikzpicture}
\end{document}
答案2
我建议你看一下TikZ 手册其中有一个关于褪色的部分。您展示的封面设计很可能受 Springer 出版社的版权保护,这就是为什么我不会对您的问题给出完整的回答。
也就是说,既然您已经使用过,那么blend mode=screen
您可以使用伪色transparent
来创建与背景颜色混合的淡入淡出效果,如下面的代码所示:
\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\clip (current page.north west) coordinate (A) rectangle (current page.south east) coordinate (C);
\path[fill=blue] (A) rectangle (C);
\path[top color=white, bottom color=transparent, fill opacity=0.5, blend mode=screen] (0,0) rectangle +(20,-20);
\end{tikzpicture}
\end{document}