Skip to content

ColorTransform

Base classes

Name Children Inherits
QColorTransform
PySide6.QtGui
QColorTransform(self, /) -> None

⋔ Inheritance diagram

graph TD
  3351797536["gui.ColorTransform"]
  3996521037["QtGui.QColorTransform"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  3996521037 --> 3351797536
  37984305 --> 3996521037
  2751680898 --> 37984305

🛈 DocStrings

Bases: QColorTransform

Transformation between color spaces.

Source code in prettyqt/gui/colortransform.py
class ColorTransform(QtGui.QColorTransform):
    """Transformation between color spaces."""

    def __repr__(self):
        return get_repr(self)

    def map_color(self, color: datatypes.ColorType) -> gui.Color:
        """Apply the color transformation to a color."""
        return gui.Color(self.map(colors.get_color(color)))

map_color(color: datatypes.ColorType) -> gui.Color

Apply the color transformation to a color.

Source code in prettyqt/gui/colortransform.py
def map_color(self, color: datatypes.ColorType) -> gui.Color:
    """Apply the color transformation to a color."""
    return gui.Color(self.map(colors.get_color(color)))

:fa-brands-github: Show source on GitHub