# Definecolor Not Working in Beamer

I have an A0 poster in beamer which I'm trying to create some of my own colors for, however my code refuses to acknowledge \definecolor . Here is my full preamble which compiles fine when the definecolor and setbeamercolor lines are commented out and produces the error when they're included.

\documentclass[final,20pt]{beamer}

\usepackage[utf8]{inputenc}

\usepackage{tcolorbox}
\usepackage{url}
\usepackage{paralist}
\usepackage[font=large,labelfont=large,labelfont={color=red}]{caption}
\usepackage[font=Large]{caption}
\usepackage[font=Large]{subcaption}
\usepackage{enumerate}
\usepackage{xcolor}

\newenvironment{myalign}{\par\nobreak\Large\noindent\align}{\endalign}
\newenvironment{myalign2}{\par\nobreak\large\noindent\align}{\endalign}
\newenvironment{mygather}{\par\nobreak\Large\noindent\gather}{\endgather}

\usepackage{geometry}
\geometry{paperwidth=841mm,paperheight=1189mm,hmargin=2cm}

\font\titlefont=cmr12 at 105pt
\font\authorfont=cmr12 at 40pt
\font\institutefont=cmr12 at 40pt

\definecolor{blue}{rgb}{0,0,1}
\setbeamercolor{background canvas}{blue}

\begin{document}
\begin{frame}{}

\end{frame}
\end{document}


The specific error I'm getting is "Package keyval error: blue undefined", I can only guess there is some conflict in the packages I have installed somewhere but I haven't been able to find out what.

\setbeamercolor{background canvas}{bg=blue}