When using the QGIS Gui, there are plenty of predefined colorramps to choose from when styling a layer with e.g. categorized symbology.
When using the Python console for PyQGIS scripting, this page of the API docs describes how to create your own colorramp that you can then apply to a renderer object, for example:
# create a new colorramp
colorRamp = QgsVectorGradientColorRampV2.create({'color1' : '0,255,0,255',
'color2' : '255,0,0,255',
'stops' : '0.5;255,255,0,255'})
# set up an empty categorized renderer and assign the colorramp
renderer = QgsCategorizedSymbolRendererV2(field, [])
renderer.setSourceColorRamp(colorRamp)
Is there a way to access the predefined colorramps that are accessible from the GUI and assign them to a renderer instead of creating my own?