erlab.interactive.colors¶
Functions for manipulating colors in Qt.
Module Attributes
|
Colormaps to exclude from the list of available colormaps. |
Functions
|
Convert a matplotlib color to a |
|
Get a |
|
Get all valid |
|
|
|
Convert a |
Classes
|
|
|
|
|
|
|
- class erlab.interactive.colors.BetterColorBarItem(parent=None, image=None, autoLevels=False, limits=None, pen='c', hoverPen='m', hoverBrush='#FFFFFF33', **kargs)[source]¶
Bases:
PlotItem
- property images¶
- property primary_image¶
- class erlab.interactive.colors.BetterImageItem(image=None, **kwargs)[source]¶
Bases:
ImageItem
pyqtgraph.ImageItem
with improved colormap support.- Parameters:
image (npt.NDArray | None) – Image data
**kwargs – Additional arguments to
pyqtgraph.ImageItem
.
- Signals:
sigColorChanged()
sigLimitChanged(float, float)
- class erlab.interactive.colors.ColorMapComboBox(*args, **kwargs)[source]¶
Bases:
QComboBox
- LOAD_ALL_TEXT = 'Load all...'¶
- class erlab.interactive.colors.ColorMapGammaWidget(parent=None, value=1.0, slider_cls=None, spin_cls=None)[source]¶
Bases:
QWidget
- erlab.interactive.colors.color_to_QColor(c, alpha=None)[source]¶
Convert a matplotlib color to a
PySide6.QtGui.QColor
.- Parameters:
c (`ColorType <matplotlib.typing.ColorType>`) – A valid matplotlib color. See the matplotlib documentation for more information.
alpha (float | None) – If supplied, applies transparency to the color.
- Return type:
- erlab.interactive.colors.pg_colormap_from_name(name, skipCache=True)[source]¶
Get a
pyqtgraph.ColorMap
from its name.- Parameters:
name (str) – A valid colormap name.
skipCache (bool) – Whether to skip cache, by default
True
. Passed ontopyqtgraph.colormap.get()
.
- Return type:
- erlab.interactive.colors.pg_colormap_names(source='all', exclude_local=False)[source]¶
Get all valid
pyqtgraph
colormap names.
- erlab.interactive.colors.pg_colormap_powernorm(cmap, gamma, reverse=False, highContrast=False, zeroCentered=False, N=65536)[source]¶
- erlab.interactive.colors.pg_colormap_to_QPixmap(cmap, w=64, h=16, skipCache=True)[source]¶
Convert a
pyqtgraph.ColorMap
to aw
-by-h
QPixmap thumbnail.- Parameters:
- Return type: