分享

LaTeX-color&xcolor宏包的使用

 工作学习资料馆 2018-10-03
\documentclass{article}
\usepackage{xeCJK}
\usepackage{mathpazo}
\usepackage{color,xcolor}
% predefined color---black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.

\definecolor{light-gray}{gray}{0.95}    % 1.灰度
\definecolor{orange}{rgb}{1,0.5,0}      % 2.rgb
\definecolor{orange}{RGB}{255,127,0}    % 3.RGB
\definecolor{orange}{HTML}{FF7F00}      % 4.HTML
\definecolor{orange}{cmyk}{0,0.5,1,0}   % 5.cmyk

\begin{document}
%\pagecolor{yellow}          %设置背景色为黄色
\textcolor{green}{绿色}     %1.方法一
{\color{orange} 橙色}       %2.方法二

\colorbox{red}{\color{black}红底黑字}
\fcolorbox{red}{green}{红框绿背景} %框色+背景色

\color{blue!20}
\color{blue!20!black}
\color{blue!20!black!30!green}  %a mixture of (20*0.3) percent blue, ((100-20)*0.3) percent black and (100-30) percent green

{\color[rgb]{1,0,0} This text will appear red-colored}          % 直接使用
\textcolor[rgb]{0,1,0}{This text will appear green-colored}     % 直接使用

\end{document} 


作者:野狗子嗷嗷嗷
链接:https://www.jianshu.com/p/d184caa2cf15
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多