[Update]The following solution is no longer applicable in the new versions. You can now directly choose from which field you would like the color to be taken from using Studio.
This solution will require Studio.
1) Open your task and add an integer field. Change the widget of your field to color picker.
You will then be able to set a color on a task
2) After that, go to the Gantt view and open Studio. Change the field color with the new field you just created
3) Color of the task in Gantt view is now the color set on the task
New version : starting from 16.3
This was a big help!
Thanks for this idea & providing instructions