Adds check that rgb sequence is of length 3
Improves check of arg range
Removes unnecessary float conversions
Merge pull request #3092 from ga7g08/fix-issue-3079

Adds check that rgb sequence is of length 3