Class: QgsRecentColorScheme

class qgis.core.QgsRecentColorScheme

Bases: QgsColorScheme

Constructor for QgsRecentColorScheme.

QgsRecentColorScheme(QgsRecentColorScheme)

A color scheme which contains the most recently used colors.

Methods

addRecentColor

Adds a color to the list of recent colors.

clone

rtype

QgsRecentColorScheme

fetchColors

param context

flags

rtype

QgsColorScheme.SchemeFlags

lastUsedColor

Returns the most recently used color.

schemeName

rtype

str

addRecentColor(color: Union[QColor, Qt.GlobalColor, QGradient])

Adds a color to the list of recent colors.

Parameters

color (Union[QColor) – color to add

See also

lastUsedColor()

New in version 2.14.

clone(self) → QgsRecentColorScheme
Return type

QgsRecentColorScheme

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

  • baseColor (Union[QColor) –

Return type

List[Tuple[QColor, str]]

flags(self) → QgsColorScheme.SchemeFlags
Return type

QgsColorScheme.SchemeFlags

lastUsedColor() → QColor

Returns the most recently used color.

See also

addRecentColor()

New in version 3.0.

Return type

QColor

schemeName(self) → str
Return type

str