Fix variable scope for color picker

This intend to bo conflict when new fields was defined (like datepicker) after color picker where $field variable was no longer the same