Set color scheme based on color return by SQL query

Hello all,

I am using Grafana with MySQL data source, I have 2 tables events and event_logs.
events(id, name, color) (color contains RGB Hexadecimal values like #ccccdc)
event_logs(id, events_id, start_date, end_date)
I am using data of this table to show different charts line pie chart to show number of events created for specific event or time series chart to show number of event created for specific event over the period of time and it is working as expected.
But one functionality I am not able to implement is set the color of pie or line from the color column in events table.

Any help would be appreciated!
Thanks