Perhaps there is a simple GUI method which has been overlooked but the following snippet should colour your legend symbols as those stored in the attribute field containing the RGB values. You can copy/paste the following function into the Python Console:
from ast import literal_eval as make_tuple
def matchLegendColour(layer, categoryField, colorField):
# Create dictionary to store
# 'attribute value' : ('symbol colour', 'legend name')
land_class = {}
for feat in layer.getFeatures():
land_class[feat[categoryField]] = (feat[colorField], str(feat[categoryField]))
# Create list to store symbology properties
categories = []
# Iterate through the dictionary
for classes, (color, label) in land_class.items():
# Automatically set symbols based on layer's geometry
symbol = QgsSymbol.defaultSymbol(layer.geometryType())
# Convert colour attribute into tuple to insert into QColor
colours = make_tuple(color)
# Extract the colours
(red, green, blue) = colours[0], colours[1], colours[2]
# Set colour
symbol.setColor(QColor(red, green, blue))
# Set the renderer properties
category = QgsRendererCategory(classes, symbol, label)
categories.append(category)
# Field name
expression = categoryField
# Set the categorized renderer
renderer = QgsCategorizedSymbolRenderer(expression, categories)
layer.setRenderer(renderer)
# Refresh layer
layer.triggerRepaint()
Then to run said function, we can define the 3 parameters to set the chosen layer, the field name for the values, and the field name containing the RGB attribute (assuming they are stored as 187,51,129 etc):
matchLegendColour(iface.activeLayer(), 'Value', 'Colour')

(187,51,129)or[187,51,129]etc. – Joseph Nov 07 '19 at 11:16