\href{https://travis-ci.org/regexps/rgb-regex}{\texttt{ }}

Regex for RGB color strings.\hypertarget{md_sfcode_node_modules_rgb_regex_README_autotoc_md24926}{}\doxysection{Installation}\label{md_sfcode_node_modules_rgb_regex_README_autotoc_md24926}

\begin{DoxyCode}{0}
\DoxyCodeLine{npm install -\/-\/save rgb-\/regex }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_rgb_regex_README_autotoc_md24927}{}\doxysection{Usage}\label{md_sfcode_node_modules_rgb_regex_README_autotoc_md24927}

\begin{DoxyCode}{0}
\DoxyCodeLine{var rgbRegex = require('rgb-\/regex');}
\DoxyCodeLine{}
\DoxyCodeLine{rgbRegex(\{ exact: true \}).test('rgb(12, 34, 56)');  // => true}
\DoxyCodeLine{rgbRegex(\{ exact: true \}).test('unicorns');         // -\/> false}
\DoxyCodeLine{rgbRegex(\{ exact: true \}).test('rgb(,,)');          // => false}
\DoxyCodeLine{}
\DoxyCodeLine{rgbRegex().exec('rgb(12, 34, 56)');}
\DoxyCodeLine{// => [}
\DoxyCodeLine{//  '12',}
\DoxyCodeLine{//  '34',}
\DoxyCodeLine{//  '56',}
\DoxyCodeLine{//  index: 0,}
\DoxyCodeLine{//  input: 'rgb(12,34,56)'}
\DoxyCodeLine{// ]}
\DoxyCodeLine{}
\DoxyCodeLine{'rgb(12, 34, 56) cats and dogs'.match(rgbRegex());}
\DoxyCodeLine{// = ['rgb(12, 34, 56)'] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_rgb_regex_README_autotoc_md24928}{}\doxysection{License}\label{md_sfcode_node_modules_rgb_regex_README_autotoc_md24928}
MIT\hypertarget{md_sfcode_node_modules_rgb_regex_README_autotoc_md24929}{}\doxysection{Contributing}\label{md_sfcode_node_modules_rgb_regex_README_autotoc_md24929}

\begin{DoxyEnumerate}
\item Fork it
\item Create your feature branch ({\ttfamily git checkout -\/b my-\/new-\/feature})
\item Commit your changes (`git commit -\/am \textquotesingle{}Add some feature'{\ttfamily )}
\item {\ttfamily Push to the branch (}git push origin my-\/new-\/feature\`{})
\item Create new Pull Request
\end{DoxyEnumerate}

Crafted with $<$3 by John Otander (\mbox{[}@4lpine\mbox{]}(\href{https://twitter.com/4lpine}{\texttt{ https\+://twitter.\+com/4lpine}})).

\DoxyHorRuler{0}


\begin{quote}
This package was initially generated with \href{http://yeoman.io}{\texttt{ yeoman}} and the \href{https://github.com/johnotander/generator-p.git}{\texttt{ p generator}}. \end{quote}
