Access Manager Appliance v5.0.4 Branding not being saved

Dear community,

It seems like we cannot save new branding on our access manager 5.0.4 and the problem is shown this way:

When we go to "Branding" in access manager administration console it welcomes us with normal behaviour showing us the menu where we should be able to change branding.

We can use all of the fields to change the preview branding like this:

When we click "Save" button the access manager responds with an popup saying it did not save the changes and does not give any reason for it:

If we take a quick look into the console and inspect what is happening we can quickly see that the branding was not saved because the server has returned internal error (500):

In the logs of the administration console on server we can also see, that it is complaining about required field "backgroundColor1" which should not be empty, but the access manager is saying that it is:

In the payload of sent request we can see, that the color was in the body and it was anything else but empty:

With kind regards,

Sebastian Novak