Is there a plugin for supporting opening KML files with colors, as currently the KML format is supported, but the colors and styles that comes with it are dropped?
I've created a KML style file:
http://www.files.com/shared/599d872e33689/sierraLeone.kml.zip
Uploading it to KML viewer, it's displaying properly, but in QGIS it fails. The kml viewer site:
http://ivanrublev.me/kml/
Best Answer
I found another way... Hold on it's tricky ! I put here this solution with the main parts you need. It's a bit long to set up compared to your actual work but it can be used for wider sets of data.
As you can see, the hexadecimal code is in the table (in red), just in front of the name column. Yeah, we have the name field and the color value.
Get all the name and the styleUrl into another sheet.
Clean the data by removing duplicates.
You should now have only a flat table with a name and a color column.
Now you have a choice. Either you extract the RGB values in Excel or in QGIS. QGIS needs at the end values in R,G,B,A (Red Green Blue Alpha) style.
Prepair the color value in EXCEL
In Excel, you will first have to split up the hexa values in 3 with string operators like MID(), then convert them into decimal with HEX2DEC().
You will then need to reassemble in a string field to match QGIS formating needs in the data defined column for the color.
See here : Convert HEX to RGB in Excel
Prepair the color value in QGIS
You will need to create a little function (see below) to convert hexa values to decimal, but it's almost the same logic.
Put the following code in the function editor, then click on load.
Final rendering