Class: QgsPresetSchemeColorRamp¶
A scheme based color ramp consisting of a list of predefined colors.
Class Hierarchy¶
Base classes¶
Abstract base class for color ramps  | 
|
Abstract base class for color schemes  | 
Methods
Returns the list of colors used by the ramp.  | 
|
Sets the list of colors used by the ramp.  | 
Static Methods
Returns a new   | 
|
Returns the string identifier for QgsPresetSchemeColorRamp.  | 
- class qgis.core.QgsPresetSchemeColorRamp[source]¶
 Bases:
QgsColorRamp,QgsColorScheme- __init__(colors: Iterable[QColor | Qt.GlobalColor] = [])
 Constructor for QgsPresetSchemeColorRamp.
- Parameters:
 colors (Iterable[Union[QColor, Qt.GlobalColor]] = []) – list of colors in ramp
- __init__(colors: Iterable[Tuple[QColor | Qt.GlobalColor, str | None]])
 Constructor for
QgsPresetColorRamp.- Parameters:
 colors (Iterable[Tuple[Union[QColor, Qt.GlobalColor], Optional[str]]]) – list of named colors in ramp
- __init__(a0: QgsPresetSchemeColorRamp)
 - Parameters:
 
- colors(self) List[QColor]¶
 Returns the list of colors used by the ramp.
See also
- Return type:
 List[QColor]
- static create(properties: Dict[str, Any] = {}) QgsColorRamp | None[source]¶
 Returns a new
QgsPresetSchemeColorRampcolor ramp created using the properties encoded in a string map.- Parameters:
 properties (Dict[str, Any] = {}) – color ramp properties
See also
properties()- Return type:
 Optional[QgsColorRamp]
- setColors(self, colors: Iterable[Tuple[QColor | Qt.GlobalColor, str | None]], a1: str | None = '', a2: QColor | Qt.GlobalColor = QColor()) bool[source]¶
 Sets the list of colors used by the ramp.
- Parameters:
 colors (Iterable[Tuple[Union[QColor, Qt.GlobalColor], Optional[str]]]) – list of colors
See also
- Parameters:
 a1 (Optional[str] = '')
a2 (Union[QColor, Qt.GlobalColor] = QColor())
- Return type:
 bool