MWE
\documentclass{article}
\usepackage{mathtools,xcolor}
\begin{document}
\textcolor{red}{\"\!\!\!{\textcolor{black}{o}}} %<-- ?
\end{document}
Is there a way to make this easier? Also work in other accents?
Accents over nothing are raised by 1ex:
\documentclass{article}
\usepackage{xcolor}
\newcommand{\cu}[2][red]{% colored umlaut
\leavevmode
\vbox{
\halign{%
\hfil##\hfil\cr
\textcolor{#1}{\"{}}\cr
\noalign{\nointerlineskip\kern-1ex}
#2\cr
}
}%
}
\newcommand{\cc}[2][red]{% colored cedilla
\leavevmode
\begingroup
\ooalign{\hfil#2\hfil\cr\hfil\textcolor{#1}{\c{}}\hfil\cr}%
\endgroup
}
\begin{document}
\cu{O}zg\cu{u}r \"Ozg\"ur \cc[blue]{C}\cc{c}\cc{S}\cc{s} \c{C}\c{c}\c{S}\c{s}
\bigskip
\LARGE \cu{O}zg\cu{u}r \"Ozg\"ur
\end{document}
You could use stackengine
:
\documentclass{article}
\usepackage{mathtools,xcolor}
\usepackage{stackengine}
\newcommand{\my}[2]{\stackinset{c}{}{c}{1.1pt}{\color{red}#2}{\color{black}#1}}
\newcommand{\myc}[1]{\stackinset{c}{}{c}{.8pt}{#1}{\color{red}\c{#1}}}
\begin{document}
S\my{o}{\"}\"{o}mething \c{c}\myc{c}o\c{s}\myc{s}a
\end{document}
Perhaps just wrap it in a macro, like so:
\documentclass{article}
\usepackage{mathtools,xcolor}
\newcommand{\oo}{\makebox[0pt][l]{\color{red}\"{}}o}
\newcommand{\cc}[1]{\makebox[0pt][l]{\color{red}\c{#1}}#1}
\begin{document}
L\oo\oo{k} at this: \cc{c} and \cc{s}
\end{document}
\newcommand{\cc}[1]{\makebox[0pt][l]{\color{red}\c{#1}}#1}
and using \cc{c}
/\cc{s}
in the doc? It prints the black c
on top of the red one, not sure it that would affect anything in your document
Here is a dirty solution, but it might work for weird accents as well:
Usually it is easier to get the letter without the dots than the dots without the letter. Therefore you can draw the complete letter in red, then draw the non-accent part over it:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\begin{document}
\textcolor{red}{ö}%% make a red ö
\llap{o}%% print a black o over it
\end{document}
It doesn't really look good at lower zoom levels, but it might be useful if you don't know how to compose the character.