Using AJAX to send front-end data to back-end

I’ve completed my second week of GSoC and the main task for this week was to create a form which could send palette data to the back-end to create CSS files which would be used in t he new theme. The main problem was that palette data was in HTML and was being generated dynamically by using javascript.

So I solved this problem by adding hidden input in the form when Submit button is pressed and send that using AJAX. Now my main focus is to assign different colours of colour palette to various elements.