You should try to put the following in the startup.py file
from qgis.PyQt.QtCore import QSettings
settings = QSettings()
I'm not sure you can get what you want using QgsHighlight. It accepts 3 parameters. Amongst them, I don't see how you could set a reference to a QgsGeometry or a particular ...
Why so complicated Yoann Quenach de Quivillic ?
Step 1 (the same) : Open the Layer Styling panel to set a data-defined color
Step 2 : copy the formula in the expression builder eval('color_cmyk(' || "cmykFargekode" || ')')
Step 2 (bis) : here the formula without eval() function :
Since you mention you're a rookie, here is a detailed step-by-step guide :
Open the Layer Styling panel to set a data-defined color
Right click on the layer in the layer tree, and click Properties... to open the above panel
Click on Symbology (1) to open the layer styling tab
Click on Simple Fil (2) to configure symbol
Click on the button on the right of ...