Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 250 additions & 0 deletions res/controllers/CueColorsReference.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/util/color/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Color {

// If the baseColor is darker than the global threshold,
// returns a lighter color, otherwise returns a darker color.
static inline QColor chooseContrastColor(QColor baseColor) {
static QColor chooseContrastColor(QColor baseColor) {
// Will produce a color that is 60% brighter.
static const int iLighterFactor = 160;
// We consider a hsv color dark if its value is <= 20% of max value
Expand Down
49 changes: 21 additions & 28 deletions src/util/color/predefinedcolorsset.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,53 @@ class PredefinedColorsSet final {
0
);
const PredefinedColorPointer red = std::make_shared<PredefinedColor>(
QColor("#E6194B"),
QColor("#c50a08"),
QLatin1String("Red"),
QObject::tr("Red"),
1
);
const PredefinedColorPointer green = std::make_shared<PredefinedColor>(
QColor("#3CB44B"),
QColor("#32be44"),
QLatin1String("Green"),
QObject::tr("Green"),
2
);
const PredefinedColorPointer yellow = std::make_shared<PredefinedColor>(
QColor("#FFE119"),
QLatin1String("Yellow"),
QObject::tr("Yellow"),
3
);
const PredefinedColorPointer blue = std::make_shared<PredefinedColor>(
QColor("#4363D8"),
QColor("#0044ff"),
QLatin1String("Blue"),
QObject::tr("Blue"),
3
);
const PredefinedColorPointer yellow = std::make_shared<PredefinedColor>(
QColor("#f8d200"),
QLatin1String("Yellow"),
QObject::tr("Yellow"),
4
);
const PredefinedColorPointer cyan = std::make_shared<PredefinedColor>(
QColor("#42D4F4"),
QLatin1String("Cyan"),
QObject::tr("Cyan"),
QColor("#42d4f4"),
QLatin1String("Celeste"),
QObject::tr("Celeste"),
5
);
const PredefinedColorPointer magenta = std::make_shared<PredefinedColor>(
QColor("#F032E6"),
QLatin1String("Magenta"),
QObject::tr("Magenta"),
QColor("#af00cc"),
QLatin1String("Purple"),
QObject::tr("Purple"),
6
);
const PredefinedColorPointer pink = std::make_shared<PredefinedColor>(
QColor("#FABEBE"),
QColor("#fca6d7"),
QLatin1String("Pink"),
QObject::tr("Pink"),
7
);
const PredefinedColorPointer teal = std::make_shared<PredefinedColor>(
QColor("#469990"),
QLatin1String("Teal"),
QObject::tr("Teal"),
const PredefinedColorPointer white = std::make_shared<PredefinedColor>(
QColor("#f2f2ff"),
QLatin1String("White"),
QObject::tr("White"),
8
);
const PredefinedColorPointer grey = std::make_shared<PredefinedColor>(
QColor("#A9A9A9"),
QLatin1String("Grey"),
QObject::tr("Grey"),
9
);

// The list of the predefined colors.
const QList<PredefinedColorPointer> allColors {
Expand All @@ -83,8 +77,7 @@ class PredefinedColorsSet final {
cyan,
magenta,
pink,
teal,
grey,
white,
};

PredefinedColorsSet()
Expand Down