Class: QgsPresetSchemeColorRamp¶
-
class
qgis.core.
QgsPresetSchemeColorRamp
(colors: Iterable[Union[QColor, Qt.GlobalColor, QGradient]] = [])¶ Bases:
qgis._core.QgsColorRamp
,qgis._core.QgsColorScheme
Constructor for QgsPresetSchemeColorRamp.
- Parameters
colors – list of colors in ramp
QgsPresetSchemeColorRamp(colors: Iterable[Tuple[Union[QColor, Qt.GlobalColor, QGradient], str]]) Constructor for
QgsPresetColorRamp
.- Parameters
colors – list of named colors in ramp
QgsPresetSchemeColorRamp(QgsPresetSchemeColorRamp)
A scheme based color ramp consisting of a list of predefined colors.
New in version 3.0: Enums
Methods
Returns the list of colors used by the ramp.
Returns a new QgsPresetSchemeColorRamp color ramp created using the properties encoded in a string map.
Sets the list of colors used by the ramp.
Signals
Attributes
-
clone
(self) → QgsPresetSchemeColorRamp¶
-
color
(self, value: float) → QColor¶
-
colors
(self) → List[QColor]¶ Returns the list of colors used by the ramp.
See also
-
count
(self) → int¶
-
create
(properties: Dict[str, str] = {}) → QgsColorRamp¶ Returns a new QgsPresetSchemeColorRamp color ramp created using the properties encoded in a string map.
- Parameters
properties – color ramp properties
See also
-
fetchColors
(self, context: str = '', baseColor: Union[QColor, Qt.GlobalColor, QGradient] = QColor()) → List[Tuple[QColor, str]]¶
-
invert
(self)¶
-
isEditable
(self) → bool¶
-
properties
(self) → Dict[str, str]¶
-
schemeName
(self) → str¶
-
setColors
(self, colors: Iterable[Tuple[Union[QColor, Qt.GlobalColor, QGradient], str]], a1: str = '', a2: Union[QColor, Qt.GlobalColor, QGradient] = QColor()) → bool¶ Sets the list of colors used by the ramp.
- Parameters
colors – list of colors
See also
-
type
(self) → str¶
-
value
(self, index: int) → float¶