Maya Python Override Color RGB

from pymel.core import *

exampleNodes = selected()

for n in exampleNodes:
    n.overrideEnabled.set(1)
    n.overrideRGBColors.set(1)
    n.overrideColorRGB.set(0.4, 0.2, 0.8)
McHuckabagel