I want to obtain the color code of the current feature like this : Getting currentfeature's color in Expression Builder of QGIS?
But I am in QGIS 3.14 and I dont understand how to convert the script with the new API. I have changed
layer = QgsMapLayerRegistry.instance().mapLayersByName(layername) r = layer.rendererV2()
layer = QgsProject.instance().mapLayersByName(layername) r = layer.renderer()
But I have an error with
symbol = r.symbolForFeature(feature)