Thursday, January 21, 2021

Assign color to vector layer based on HTML Notation (HEX color) codes in attribute table

 Here, I have a polygon layer with 'color' attribute column which contains HEX color codes as seen below.

We want to assign each polygon to its attribute color value, for example: Delta = #6808C9.

This is close to 'Categorized Symbology', but the only difference is that the colors are from the attribute column. To do this, we have to edit the 'Fill Color' expression to read the color column.

This way, each polygon is given a HEX color code that corresponds to the value on the attribute column.

Happy Mapping!

No comments:

Post a Comment