Creating a custom color selector in JavaScript