As a follow up to my recent question: Now I'd like to put some color on to that line/rule. In the MWE below, \arrayrulecolor{blue}\mycline{1-1} throws an error (undefined control sequence with respect to \arrayrulecolor). How can I make \mycline accept a color?
% \PassOptionsToPackage{table}{xcolor}
\documentclass[a4paper]{article}
% \usepackage{booktabs}
% \usepackage{array}
\newlength{\mycustomlength}
\settowidth\mycustomlength{blaaaaaaaa}
\makeatletter
\def\mycline#1{\expandafter\my@cline\@cline#1\@nil}
\def\my@cline#1\leaders#2\hfill{%
#1\hfill\leaders#2\hskip\mycustomlength\hfill\kern\z@}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[framemethod=TikZ, xcolor=RGB,table]{mdframed}
% \usepackage[RGB]{xcolor}
\definecolor{mycolor}{RGB}{0,111,222}
\mdfsetup{skipabove=\topskip,skipbelow=\topskip, nobreak=true, innertopmargin=0.5\baselineskip, innerbottommargin=0.5\baselineskip, frametitleaboveskip=3pt, frametitlebelowskip=2pt, skipabove=\topskip,skipbelow=\topskip}
\mdfdefinestyle{my_style}{%
linecolor=mycolor,middlelinewidth=0.7pt, frametitlebackgroundcolor=mycolor}
\usepackage{tabularx}
\usepackage{multirow}
%------------------------------------
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{mdframed}[style=my_style,frametitle=\color{white}{OOO}]
\begin{tabularx}{\textwidth}{@{}*{1}{|p{\mycustomlength}|}*{1}{X}@{}}
\textbf{AAAAAA} & \\
\mycline{1-1}
%%%\arrayrulecolor{blue}\mycline{1-1}
% \cline{1-1}
aaaaaaaaa & \textbf{aaaa} \\
aaaa & \textbf{aa} \\
\\
\textbf{BBBB} & \\
% \rule{\mycustomlength}{0.4pt}
% & \\
% \\
% \cline{1-1}
\mycline{1-1}
bbb & bbbbbbbbb \textbf{b} \\
bbbbb & \textbf{B} \\
\end{tabularx}
% \end{tabulary}
\end{mdframed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \lipsum
\end{document}
Cf. also:
Note that in theory mdframed should load xcolor which in turn should load colortbl (cf. the resp. documentation files). But there seem multiple ways of calling these packages; and apart from how they are called/loaded the order in which they are called/loaded also matters...

\usepackage[framemethod=TikZ, xcolor={RGB,table}]{mdframed}-- You forgot the brackets atxcolor={RGB,table}– Marco Daniel Jul 08 '13 at 11:19tikzloadsxcolorand so all options related toxcolorare ignored. – Marco Daniel Jul 08 '13 at 16:26RGBoption does not seem to be ignored... or is it? – nutty about natty Jul 08 '13 at 16:40pgfcore.stywhich loadsxcolor– Marco Daniel Jul 08 '13 at 16:45tikzloadsxcolor, but does it loadxcolorwithxcolor'sRGBoption - or without it? – nutty about natty Jul 08 '13 at 16:49