The question has been written above.
Asked
Active
Viewed 1,941 times
2 Answers
9
You can use fcolorbox from the xcolor package or you can define your own command!
\documentclass{article}
\usepackage[kernelfbox]{xcolor}
\begin{document}
\def\twocolorbox#1#2#3{\color{#1}\fbox{\color{#2}#3}}
\twocolorbox{blue}{red}{terrible}
\fcolorbox{gray}{yellow}{test}
\end{document}
yannisl
- 117,160
4
\documentclass{article}
\usepackage{color}
\newcommand{\myfbox}[2]{\textcolor{#1}{\fbox{\normalcolor#2}}}
\begin{document}
\myfbox{red}{This is a test}
\end{document}
or
\documentclass{article}
\usepackage{color}
\newcommand{\myfbox}[2]{\fcolorbox{#1}{white}{#2}}
\begin{document}
\myfbox{red}{This is a test}
\end{document}
IRAN
- 2,338
\fcolorboxis? – Joel Feb 18 '16 at 01:06