This Question has been related to this one:
Making colours from table with colour percentages/RGB-codes
In that scenario I have made sure that my layer has the right colours based on a expression. This is just because this certain dataset has "standard" we all have to follow.
The thing is this is based on a single symbol expression (aka the hexcode rgb). The colours are right, however when I want to construct a legend by the "ouderdom" layer, the colours of the legend are wrong. This is ofcourse because when I try to categorize it by that field, in the legend random colours are chosen, causing the legend to display the wrong colours.
So to clarify my symbology of the layers needs to based on the "ouderdom" field categorisation but the colouring needs to still happen the same expression (so no random colours), how do I do this?
To Illustrate what I mean I will ad some screenshots here:
Now this is the setting I use to set the right colour to my features in the layer:
In this second screenshot I will result a clear colloring like this:
Which matches the standard map of the dataset seen here, this is the standard of the legend everyone has to follow in terms of coloring:
https://www.dov.vlaanderen.be/sites/default/files/pfiles_files/tertiairkaartA3_0.pdf
The problem is as you may have noticed is the legend highlighted in this screenshot here:
So now I hope you see and understand what the problem is.