MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / blendColor

Function blendColor

pj_widgets/src/Timeline.cpp:275–278  ·  view source on GitHub ↗

Linear RGB blend a*(1-t) + b*t.

Source from the content-addressed store, hash-verified

273
274// Linear RGB blend a*(1-t) + b*t.
275QColor blendColor(const QColor& a, const QColor& b, double t) {
276 const auto mix = [t](float x, float y) { return static_cast<float>((x * (1.0 - t)) + (y * t)); };
277 return QColor::fromRgbF(mix(a.redF(), b.redF()), mix(a.greenF(), b.greenF()), mix(a.blueF(), b.blueF()));
278}
279
280// Theme-derived timeline colours. The app syncs QPalette::Window / WindowText per
281// theme (Theme::syncApplicationPalette) and QSS does NOT touch the palette, so a

Callers 1

timelineColorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected