LaTeX에서 색깔 사용하는 법: xcolor 패키지
📂논문작성LaTeX에서 색깔 사용하는 법: xcolor 패키지
설명
\usepackage{color}
LATEX에서 색깔을 사용할 수 있는 가장 기본적인 패키지는 color
이다. 프리앰블에 \usepackage{color}
를 추가하고 {\color{색깔}내용}
과 같이 사용하면 된다. 사용가능한 색깔은 다음과 같다.
colorboxblackcolorboxgreencolorboxwhitecolorboxbluecolorboxmagentacolorboxyellowcolorboxcyancolorboxred
\documentclass{article}
\usepackage{color}
\begin{document}
This is {\color{red}red} text.
\end{document}
This is red text.
\usepackage{xcolor}
xcolor
를 사용하면 더 많은 색상을 사용할 수 있다.
colorboxblackcolorboxdarkgraycolorboxlimecolorboxpinkcolorboxvioletcolorboxbluecolorboxgraycolorboxmagentacolorboxpurplecolorboxwhitecolorboxbrowncolorboxgreencolorboxolivecolorboxredcolorboxyellowcolorboxcyancolorboxlightgraycolorboxorangecolorboxteal
\documentclass{article}
\usepackage{xcolor}
\begin{document}
This is {\color{olive}olive} text.\\
This is {\color{orange}orange} text.\\
\end{document}
This is olive text.This is orange text.
\usepackage[dvipsnames]{xcolor}
옵션에 [dvipsnames]
를 추가하면 더 많은 색깔을 사용할 수 있다. 옵션과 사용가능한 색깔의 수는 다음과 같다.
[dvipsnames]
: CMYK 색깔 68개[svgnames]
: RGB 색깔 151개[x11names]
: RGB 색깔 317개
[dvipsnames]
에서 사용할 수 있는 색깔은 다음과 같으며, 나머지는 공식 문서에서 확인할 수 있다.
