erlab.interactive.colors¶
Functions for manipulating colors in Qt.
Functions
|
Convert a matplotlib color to a |
|
Get a |
|
Get all valid |
|
|
|
Convert a |
Classes
|
|
|
|
|
|
|
Slider and spinbox for adjusting colormap gamma. |
- 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:
ImageItempyqtgraph.ImageItemwith improved colormap support.- Parameters:
- Signals:
sigColorChanged()
sigLimitChanged(float, float)
- class erlab.interactive.colors.ColorMapGammaWidget(parent=None, value=1.0, slider_cls=None, spin_cls=None)[source]¶
Bases:
QWidgetSlider and spinbox for adjusting colormap gamma.
- Signals:
valueChanged(float)
- erlab.interactive.colors.color_to_QColor(c, alpha=None)[source]¶
Convert a matplotlib color to a
PySide6.QtGui.QColor.- Parameters:
c (
tuple[float,float,float] |str|tuple[float,float,float,float] |tuple[tuple[float,float,float] |str,float] |tuple[tuple[float,float,float,float],float]) – A valid matplotlib color. See the matplotlib documentation for more information.alpha (
float|None, default:None) – If supplied, applies transparency to the color.
- Returns:
- Return type:
- erlab.interactive.colors.pg_colormap_from_name(name, skipCache=True, _loaded_all=False)[source]¶
Get a
pyqtgraph.ColorMapfrom its name.- Parameters:
name (
str) – A valid colormap name.skipCache (
bool, default:True) – Whether to skip cache, by defaultTrue. Passed ontopyqtgraph.colormap.get().
- Returns:
- Return type:
- erlab.interactive.colors.pg_colormap_names(source='all', exclude_local=False)[source]¶
Get all valid
pyqtgraphcolormap names.
- erlab.interactive.colors.pg_colormap_powernorm(cmap, gamma, reverse=False, high_contrast=False, zero_centered=False, N=65536)[source]¶
- erlab.interactive.colors.pg_colormap_to_QPixmap(cmap, w=64, h=16, skipCache=True)[source]¶
Convert a
pyqtgraph.ColorMapto aw-by-hQPixmap thumbnail.- Parameters:
- Returns:
- Return type: