# Changing the color of theorem headings

I have a theorem environment, and I would like:

• The text color of `Problem`s and their contents to be a custom color (defined as `db' below)
• The text color of `Solution`s to be a custom color (defined as `dg' below), BUT NOT it's contents. I would like the contents to remain black.
• I would not like the contents of `Problem`s and `Solutions`s to be italicized
• Keep the same counter

``````\usepackage{amsmath}
\usepackage{amsthm}

\definecolor{db}{RGB}{23,20,119}
\definecolor{dg}{RGB}{2,101,15}

\newtheoremstyle{dotless}{}{}{\itshape}{}{\bfseries}{}{ }{}
\theoremstyle{dotless}
%\theoremstyle{plain}% default
\newtheorem{thm}{Theorem}%[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{defn}[thm]{Definition}
\newtheorem{examp}[thm]{Example}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{rmk}[thm]{Remark}
\newtheorem{prob}[thm]{Problem}
\newtheorem*{sol}{Solution}
\newtheorem*{qu}{Question}
\newtheorem*{as}{Assumptions}
\newtheorem*{rs}{Restatement}
\newtheorem*{ques}{Question}
``````

I've found a few pages about relevant information, but most of it was regarding boxing theorems or changing the entire environment.

• From the many-argumented `\newtheoremstyle`, I assume you use `amsthm`? – Ulrich Schwarz Jan 23 '14 at 5:28
• Are you referring to a background color or you just want the text to receive some color? – Gonzalo Medina Jan 23 '14 at 5:28
• @UlrichSchwarz Yes, amsthm, my apologies. I have added the package to the code. – Reck Jan 23 '14 at 5:31
• @GonzaloMedina The actual color of the text. For `Problem`s I would like the word and count of problem to have the text color, as well as the contents. For `Solution`, I would like it to have the text color green, but I would like its contents to remain black. I have updated the question to be a bit more specific. – Reck Jan 23 '14 at 5:33

I would imagine the following is sufficient. That is, define a `\newtheoremstyle` for the `prob` and `sol` theorems each:
``````\newtheoremstyle{dotlessP}{}{}{\color{db}}{}{\color{db}\bfseries}{}{ }{}