You may want to create an array up top with these colors called BUBBLE_UP or something, then you can just do BUBBLE_UP.indexOf(COLOR) !== -1. Also no need to use the strings of the colors, see definitions.js where we have constant values for the colors.