Class: QgsGplColorScheme

class qgis.core.QgsGplColorScheme

Bases: QgsColorScheme

A color scheme which stores its colors in a gpl palette file.

New in version 2.5.

QgsGplColorScheme() Constructor for QgsGplColorScheme.

QgsGplColorScheme(QgsGplColorScheme)

Methods

fetchColors

param context:

gplFilePath

Returns the file path for the associated gpl palette file

setColors

param colors:

fetchColors(self, context: str = '', baseColor: QColor | Qt.GlobalColor | QGradient = QColor()) List[Tuple[QColor, str]]
Parameters:
  • context (str = '') –

  • baseColor (Union[QColor) –

Return type:

List[Tuple[QColor, str]]

gplFilePath(self) str

Returns the file path for the associated gpl palette file

Return type:

str

Returns:

gpl file path

setColors(self, colors: Iterable[Tuple[QColor | Qt.GlobalColor | QGradient, str]], context: str = '', baseColor: QColor | Qt.GlobalColor | QGradient = QColor()) bool
Parameters:
  • colors (Iterable[Tuple[Union[QColor) –

  • context (str = '') –

  • baseColor (Union[QColor) –

Return type:

bool