Break up js into functions
Adding triangle gradient example of RGB