Class: QgsStyleColorRampEntity

class qgis.core.QgsStyleColorRampEntity

Bases: QgsStyleEntityInterface

A color ramp entity for QgsStyle databases.

Added in version 3.10.

QgsStyleColorRampEntity(ramp: Optional[QgsColorRamp]) Constructor for QgsStyleColorRampEntity, with the specified color ramp.

Ownership of ramp is NOT transferred.

QgsStyleColorRampEntity(a0: QgsStyleColorRampEntity)

Methods

ramp

Returns the entity's color ramp.

type

rtype:

QgsStyle.StyleEntity

ramp(self) QgsColorRamp | None

Returns the entity’s color ramp.

Return type:

Optional[QgsColorRamp]

type(self) QgsStyle.StyleEntity
Return type:

QgsStyle.StyleEntity