Please don't touch this calc.  Let's make the palette work first, then we can take care of styling.  Don't do any CSS.

In general, styling should be done from general to particular.  If you want to style an input element in a specific palette, add a class that represents that kind of palette, and style its input elements. Don't change the general look of input elements to satisfy your specific needs.