# Defining colors in a custom LaTeX class

i am trying to create my first custom latex class based on KOMA and i can't figure out how to define/use custom colors in that context.

My goal is to have a colorized title. The problem is that when i use a custom defined color, the title (or any other text for that matter) becomes invisible (but it is there!).

I have been searching for the solution to this problem for hours without success and i have no idea of what might be wrong here.

Here is a minimum working example:

% File: 'myclass.cls'
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myclass}
\RequirePackage{xcolor}
\definecolor{mycolor}{rgb}{40,40,40}
\renewcommand*{\maketitle}{
\begin{center}
\Large
\color{mycolor}
\@title   % <-- invisible
\end{center}
\pagebreak
}
\endinput

% File: textfile.tex
\documentclass{myclass}
\usepackage{lipsum}
\title{mytitle}
\begin{document}
\maketitle
\lipsum[1]
\end{document}


Thanks.