Class: QgsPresetSchemeColorRamp¶
A scheme based color ramp consisting of a list of predefined colors.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for color ramps. |
|
Abstract base class for color schemes. |
Constructor
Abstract Methods
Methods
Returns the list of colors used by the ramp. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsPresetSchemeColorRamp. See the FAQ for more details.
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 | int] = [])¶
Constructor for QgsPresetSchemeColorRamp.
- Parameters:
colors (Iterable[QColor|Qt.GlobalColor|int] = []) – list of colors in ramp
- __init__(colors: Iterable[tuple[QColor | Qt.GlobalColor | int, str | None]])
Constructor for
QgsPresetColorRamp.- Parameters:
colors (Iterable[tuple[QColor|Qt.GlobalColor|int, str|None]]) – list of named colors in ramp
- __init__(a0: QgsPresetSchemeColorRamp)
- Parameters:
- abstract clone(self) QgsPresetSchemeColorRamp | None[source]¶
- Return type:
- colors(self) list[QColor]¶
Returns the list of colors used by the ramp.
See also
- Return type:
list[QColor]
- static create(properties: dict[str | None, Any] = {}) QgsColorRamp | None¶
Returns a new
QgsPresetSchemeColorRampcolor ramp created using the properties encoded in a string map.- Parameters:
properties (dict[str|None, Any] = {}) – color ramp properties
See also
properties()- Return type:
QgsColorRamp|None
- virtual setColors(self, colors: Iterable[tuple[QColor | Qt.GlobalColor | int, str | None]], a1: str | None = '', a2: QColor | Qt.GlobalColor | int = QColor()) bool[source]¶
Sets the list of colors used by the ramp.
- Parameters:
colors (Iterable[tuple[QColor|Qt.GlobalColor|int, str|None]]) – list of colors
See also
- Parameters:
a1 (str|None = '')
a2 (QColor|Qt.GlobalColor|int = QColor())
- Return type:
bool