From attribute table to QGIS style file – step 1

I have a large number of GRASS vector layers with in the attribute table a RGB column defining the colours of the corresponding mapping units. Unfortunately, unlike GRASS, QGIS does not offer the option to to set colours from an RGB column. The feature has been requested before, but it isn’t implemented (yet).

Edit: Since writing of this post, the feature has been implemented; see this post and this post on

As an alternative, I want to create a R script that takes the RGB values from the attribute tables and uses this to create a QGIS style file (qml file). Continue reading