Class: QgsGradientStop¶
Represents a color stop within a QgsGradientColorRamp color
ramp.
Methods
Returns the color specification in which the color component interpolation will occur.  | 
|
Returns the direction to traverse the color wheel using when interpolating hue-based color specifications.  | 
|
Sets the color specification in which the color component interpolation will occur.  | 
|
Sets the direction to traverse the color wheel using when interpolating hue-based color specifications.  | 
Attributes
Gradient color at stop  | 
|
Relative positional offset, between 0 and 1  | 
- class qgis.core.QgsGradientStop[source]¶
 Bases:
object- __init__(offset: float, color: QColor | Qt.GlobalColor)
 Constructor for QgsGradientStop
- Parameters:
 offset (float) – positional offset for stop, between 0 and 1.0
color (Union[QColor, Qt.GlobalColor]) – color for stop
- __init__(a0: QgsGradientStop)
 - Parameters:
 a0 (QgsGradientStop)
- color¶
 Gradient color at stop
- colorSpec(self) QColor.Spec[source]¶
 Returns the color specification in which the color component interpolation will occur.
For multi-stop gradients this color spec will be used for the portion of the color ramp leading into the current stop.
See also
Added in version 3.24.
- Return type:
 QColor.Spec
- direction(self) Qgis.AngularDirection[source]¶
 Returns the direction to traverse the color wheel using when interpolating hue-based color specifications.
For multi-stop gradients this direction will be used for the portion of the color ramp leading into the current stop.
See also
Added in version 3.24.
- Return type:
 
- offset¶
 Relative positional offset, between 0 and 1
- setColorSpec(self, spec: QColor.Spec)[source]¶
 Sets the color specification in which the color component interpolation will occur.
Only QColor.Spec.Rgb, QColor.Spec.Hsv and QColor.Spec.Hsl are currently supported.
For multi-stop gradients this color spec will be used for the portion of the color ramp leading into the current stop.
See also
Added in version 3.24.
- Parameters:
 spec (QColor.Spec)
- setDirection(self, direction: Qgis.AngularDirection)[source]¶
 Sets the
directionto traverse the color wheel using when interpolating hue-based color specifications.For multi-stop gradients this direction will be used for the portion of the color ramp leading into the current stop.
See also
Added in version 3.24.
- Parameters:
 direction (Qgis.AngularDirection)