Class: QgsProcessingParameterColor¶
A color parameter for processing algorithms.
QgsProcessingParameterColor should be evaluated by calling
QgsProcessingAlgorithm.parameterAsColor().
Added in version 3.10.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Base class for the definition of processing parameters. |
Methods
Returns |
|
Sets whether the parameter allows opacity control. |
Static Methods
Creates a new parameter using the definition from a script code. |
|
Returns the type name for the parameter class. |
- class qgis.core.QgsProcessingParameterColor[source]¶
Bases:
QgsProcessingParameterDefinition- __init__(name: str | None, description: str | None = '', defaultValue: Any = None, opacityEnabled: bool = True, optional: bool = False)
Constructor for QgsProcessingParameterColor.
If
opacityEnabledisTrue, then users will have the option of varying color opacity.
- __init__(a0: QgsProcessingParameterColor)
- Parameters:
- static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterColor | None[source]¶
Creates a new parameter using the definition from a script code.
- Parameters:
- Return type:
- opacityEnabled(self) bool[source]¶
Returns
Trueif the parameter allows opacity control.The default behavior is to allow users to set opacity for the color.
See also
- Return type:
bool