Subgroup: Color

Class: QgsColorSchemeRegistry

class qgis.core.QgsColorSchemeRegistry

Bases: sip.wrapper

Constructor for an empty color scheme registry

QgsColorSchemeRegistry(QgsColorSchemeRegistry)

Registry of color schemes

A registry of QgsColorScheme color schemes. This class can be created directly, or accessed via a QgsApplication.colorSchemeRegistry()

New in version 2.5: Methods

addColorScheme Adds a color scheme to the registry.
addDefaultSchemes Adds all default color schemes to this color scheme.
addUserSchemes Creates schemes for all gpl palettes in the user’s palettes folder.
populateFromInstance Adds all color schemes from the global instance to this color scheme.
removeColorScheme Removes all matching color schemes from the registry
schemes Returns all color schemes in the registry

Signals

Attributes

addColorScheme(self, scheme: QgsColorScheme)

Adds a color scheme to the registry. Ownership of the scheme is transferred to the registry.

Parameters:scheme – color scheme to add
addDefaultSchemes(self)

Adds all default color schemes to this color scheme.

See also

addColorScheme()

See also

addUserSchemes()

addUserSchemes(self)

Creates schemes for all gpl palettes in the user’s palettes folder.

See also

addColorScheme()

populateFromInstance(self)

Adds all color schemes from the global instance to this color scheme.

See also

addColorScheme()

removeColorScheme(self, scheme: QgsColorScheme) → bool

Removes all matching color schemes from the registry

Parameters:scheme – color scheme to remove
Returns:true if scheme was found and removed

See also

addColorScheme()

schemes(self) → object

Returns all color schemes in the registry

Returns:list of color schemes

schemes(self, flag: QgsColorScheme.SchemeFlag) -> List[QgsColorScheme] Returns all color schemes in the registry which have a specified flag set

Parameters:flag – flag to match
Returns:list of color schemes with flag set