Class: QgsUserColorScheme

A color scheme which stores its colors in a gpl palette file within the “palettes” subfolder off the user’s QGIS settings folder.

Class Hierarchy

Inheritance diagram of qgis.core.QgsUserColorScheme

Base classes

QgsGplColorScheme

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

QgsColorScheme

Abstract base class for color schemes.

Methods

erase

Erases the associated gpl palette file from the users "palettes" folder

setName

Sets the name for the scheme

setShowSchemeInMenu

Sets whether a this scheme should be shown in color button menus.

class qgis.core.QgsUserColorScheme[source]

Bases: QgsGplColorScheme

__init__(filename: str | None)

Constructs a new user color scheme, using a specified gpl palette file

Parameters:

filename (Optional[str]) – filename of gpl palette file stored in the users “palettes” folder

__init__(a0: QgsUserColorScheme)
Parameters:

a0 (QgsUserColorScheme)

erase(self) bool[source]

Erases the associated gpl palette file from the users “palettes” folder

Return type:

bool

Returns:

True if erase was successful

setName(self, name: str | None)[source]

Sets the name for the scheme

Parameters:

name (Optional[str]) – new name

setShowSchemeInMenu(self, show: bool)[source]

Sets whether a this scheme should be shown in color button menus.

Parameters:

show (bool) – set to True to show in color button menus, or False to hide from menus