Class: QgsPresetSchemeColorRamp¶
-
class
qgis.core.
QgsPresetSchemeColorRamp
(colors: Iterable[Union[QColor, Qt.GlobalColor, QGradient]] = [])¶ Bases:
QgsColorRamp
,QgsColorScheme
Constructor for QgsPresetSchemeColorRamp.
- Parameters
colors (Iterable[Union[QColor) – list of colors in ramp
QgsPresetSchemeColorRamp(colors: object) 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.
Methods
- rtype
QgsPresetSchemeColorRamp
- param value
Returns the list of colors used by the ramp.
- rtype
int
Returns a new
QgsPresetSchemeColorRamp
color ramp created using the properties encoded in a string map.- param context
- rtype
bool
- rtype
Dict[str, str]
- rtype
str
Sets the list of colors used by the ramp.
- rtype
str
- param index
-
clone
(self) → QgsPresetSchemeColorRamp¶ - Return type
-
color
(self, value: float) → QColor¶ - Parameters
value (float) –
- Return type
QColor
-
colors
(self) → List[QColor]¶ Returns the list of colors used by the ramp.
See also
- Return type
List[QColor]
-
count
(self) → int¶ - Return type
int
-
create
(properties: Dict[str, str] = {}) → QgsColorRamp¶ Returns a new
QgsPresetSchemeColorRamp
color ramp created using the properties encoded in a string map.- Parameters
properties (Dict[str) – color ramp properties
See also
- Return type
-
fetchColors
(self, context: str = '', baseColor: Union[QColor, Qt.GlobalColor, QGradient] = QColor()) → object¶ - Parameters
context (str = '') –
baseColor (Union[QColor) –
- Return type
object
-
invert
(self)¶
-
isEditable
(self) → bool¶ - Return type
bool
-
properties
(self) → Dict[str, str]¶ - Return type
Dict[str, str]
-
schemeName
(self) → str¶ - Return type
str
-
setColors
(self, colors: object, a1: str = '', a2: Union[QColor, Qt.GlobalColor, QGradient] = QColor()) → bool¶ Sets the list of colors used by the ramp.
- Parameters
colors (object) – list of colors
See also
- Parameters
a1 (str = '') –
a2 (Union[QColor) –
- Return type
bool
-
type
(self) → str¶ - Return type
str
-
value
(self, index: int) → float¶ - Parameters
index (int) –
- Return type
float