fix: many more distinct subcategory marker colors (24, was 5)

Subcategory marker groups cycled through only 5 colors, so the 6th repeated.
Generate 24 colors across the hue wheel, interleaved (coprime step) so
consecutive groups are ~105 deg apart and colors only repeat after 24.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 15:02:16 +02:00
parent 7cf90c1e5c
commit b448085242
+8 -3
View File
@@ -1919,9 +1919,14 @@ class TimelineWidget(QWidget):
self._c_white = QColor(255, 255, 255)
self._c_black = QColor(0, 0, 0)
self._pen_ghost = QPen(QColor(120, 170, 230, 90), 1, Qt.PenStyle.DashLine)
self._other_colors = (
QColor(220, 190, 50), QColor(60, 190, 100), QColor(80, 160, 220),
QColor(200, 120, 220), QColor(220, 140, 60),
# Distinct colors for subcategory marker groups. Generated across the
# hue wheel and interleaved (coprime step) so a large number of
# subprofiles don't repeat colors quickly and adjacent ones differ a lot.
_n_other, _hue_step = 24, 7 # 7 is coprime with 24 → permutes all hues
self._other_colors = tuple(
QColor.fromHsv(((i * _hue_step) % _n_other) * 360 // _n_other,
185, 235)
for i in range(_n_other)
)
self._other_dim = tuple(
QColor(c.red(), c.green(), c.blue(), 35) for c in self._other_colors)