Adds check that rgb sequence is of length 3

Fixes issue in https://github.com/matplotlib/matplotlib/issues/3079 . I ran the tests 
and nothing breaks but I am unsure if it will break something else.