38#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
39 using ColorType = float;
41 using ColorType = qreal;
44 ColorType ar, ag, ab, aa;
45 a.getRgbF(&ar, &ag, &ab, &aa);
47 ColorType br, bg,
bb, ba;
48 b.getRgbF(&br, &bg, &
bb, &ba);
50 const auto t2 =
static_cast<ColorType
>(
t);
51 const auto interH = std::lerp(ar, br, t2);
52 const auto interS = std::lerp(ag, bg, t2);
53 const auto interV = std::lerp(ab,
bb, t2);
54 const auto interA = std::lerp(aa, ba, t2);
56 return QColor::fromRgbF(interH, interS, interV, interA);