QColormap

Inheritance diagram of PySide2.QtWidgets.QColormap

Synopsis

Functions

Static functions

Detailed Description

The PySide2.QtWidgets.QColormap class maps device independent QColors to device dependent pixel values.
class PySide2.QtWidgets.QColormap(colormap)
Parameters:colormapPySide2.QtWidgets.QColormap

Constructs a copy of another colormap .

PySide2.QtWidgets.QColormap.Mode

This enum describes how PySide2.QtWidgets.QColormap maps device independent RGB values to device dependent pixel values.

Constant Description
QColormap.Direct Pixel values are derived directly from the RGB values, also known as “True Color.”
QColormap.Indexed Pixel values represent indexes into a vector of available colors, i.e. PySide2.QtWidgets.QColormap uses the index of the color that most closely matches an RGB value.
QColormap.Gray Similar to Indexed, pixel values represent a vector of available gray tones. PySide2.QtWidgets.QColormap uses the index of the gray tone that most closely matches the computed gray tone of an RGB value.
static PySide2.QtWidgets.QColormap.cleanup()
PySide2.QtWidgets.QColormap.colorAt(pixel)
Parameters:pixelPySide2.QtCore.uint
Return type:PySide2.QtGui.QColor

Returns a PySide2.QtGui.QColor for the pixel .

PySide2.QtWidgets.QColormap.colormap()
Return type:

Returns a vector of colors which represents the devices colormap for Indexed and Gray modes. This function returns an empty vector for Direct mode.

PySide2.QtWidgets.QColormap.depth()
Return type:PySide2.QtCore.int

Returns the depth of the device.

static PySide2.QtWidgets.QColormap.initialize()
static PySide2.QtWidgets.QColormap.instance([screen=-1])
Parameters:screenPySide2.QtCore.int
Return type:PySide2.QtWidgets.QColormap

Returns the colormap for the specified screen . If screen is -1, this function returns the colormap for the default screen.

PySide2.QtWidgets.QColormap.mode()
Return type:PySide2.QtWidgets.QColormap.Mode

Returns the mode of this colormap.

See also

QColormap.Mode

PySide2.QtWidgets.QColormap.pixel(color)
Parameters:colorPySide2.QtGui.QColor
Return type:PySide2.QtCore.uint

Returns a device dependent pixel value for the color .

PySide2.QtWidgets.QColormap.size()
Return type:PySide2.QtCore.int

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.