MCPcopy Create free account
hub / github.com/KDE/kdevelop / invertColor

Function invertColor

kdevplatform/util/widgetcolorizer.cpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80};
81
82QColor invertColor(const QColor& color)
83{
84 auto hue = color.hsvHue();
85 if (hue == -1) {
86 // achromatic color
87 hue = 0;
88 }
89 return QColor::fromHsv(hue, color.hsvSaturation(), 255 - color.value());
90}
91
92std::optional<QColor> foregroundColor(const QTextFormat& format)
93{

Callers 1

collectRangesFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected