The material object has a property
diffuse_color which is the viewport color. The color you want to link is the Base Color of the Principled BSDF node inside the node tree of that material. Sadly I don't know of a way to access it from the modifier, but you could use a script like this to automatically update the diffusion colors of all objects based on that node:
for material in bpy.data.materials:
if material.node_tree is None:
principled = material.node_tree.nodes.get('Principled BSDF')
material.diffuse_color = principled.inputs['Base Color'].default_value
It will consider the value inserted manually to the Base Color field, not one connected from some texture etc. And it makes sense to replace
line_color both in the code above and in the freestyle color modifier.