[client] Refactor color picker a bit
This moves code around and modernizes the code in the color picker and its only user (the category list item).
This moves code around and modernizes the code in the color picker and its only user (the category list item).