0

Currently I am using beamer slides how ever I found the template where I am understanding how we can write fonts with different colour but to define colour I have used the codes like this

\newcommand\red[1]{{\color{red}#1}}
\newcommand\violet[1]{{\color{violet}#1}}
\newcommand\green[1]{{\color{OliveGreen}#1}}
\newcommand\blue[1]{{\color{blue}#1}}

However I am getting the error when debugging the error I got to know that I have used a package

\usepackage[usenames,dvipsnames]{pstricks}

I don't want to remove this package can you please some one suggest me how I will not get any error.

3
  • 2
    Welcome to TeX.SE! It would be helpful to make your code snippet be compilable and please show us the first error you get. Copy and paste it into your question from the log file ...
    – Mensch
    Dec 18, 2021 at 9:50
  • 2
    you have not shown your code and have not shown the error message that you got but usenames and dvipsnames are options to the color package not the pstricks package. Dec 18, 2021 at 10:28
  • I believe usenames is deprecated, but you may need to pass dvipsnames to beamer as \documentclass[xcolor={dvipsnames}]{beamer} instead to avoid a package option mismatch.
    – frabjous
    May 18 at 1:37

1 Answer 1

0

May be it can help site with colors http://latexcolor.com/

enter image description here

\documentclass{beamer}
\usetheme{CambridgeUS}

\definecolor{camel}{rgb}{0.76, 0.6, 0.42}
\definecolor{applegreen}{rgb}{0.55, 0.71, 0.0}
\definecolor{apricot}{rgb}{0.98, 0.81, 0.69}
\definecolor{aqua}{rgb}{0.0, 1.0, 1.0}
\definecolor{aquamarine}{rgb}{0.5, 1.0, 0.83}
\definecolor{brightgreen}{rgb}{0.4, 1.0, 0.0}


\newcommand{\bluetext}[1]{\textcolor{camel}{#1} }
\newcommand{\mycolor}[2]{\textcolor{#1}{#2} }


\begin{document}

\begin{frame}{Example}
\bluetext{Here is example of colored text}\\
\mycolor{applegreen}{color - Applegreen}\\
\mycolor{aqua}{color - aqua}\\
\mycolor{apricot}{color - apricot}\\
\mycolor{aquamarine}{color - aquamarine}\\
\mycolor{brightgreen}{color - brightgreen}\\

\end{frame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.