summaryrefslogtreecommitdiffstats
path: root/application/Colors.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-08-20 01:49:03 +0200
committerPetr Mrázek <peterix@gmail.com>2015-08-20 01:49:03 +0200
commitd0e88011dc025a1e68964a9363cece66c677969f (patch)
treec8f2701fb0c959ba4fc63c0e447ee71722002096 /application/Colors.cpp
parent6858f1dd6294a93c1e1ec8007cb0434b53646488 (diff)
downloadMultiMC-d0e88011dc025a1e68964a9363cece66c677969f.tar
MultiMC-d0e88011dc025a1e68964a9363cece66c677969f.tar.gz
MultiMC-d0e88011dc025a1e68964a9363cece66c677969f.tar.lz
MultiMC-d0e88011dc025a1e68964a9363cece66c677969f.tar.xz
MultiMC-d0e88011dc025a1e68964a9363cece66c677969f.zip
GH-1197 finish color stuff
Diffstat (limited to 'application/Colors.cpp')
-rw-r--r--application/Colors.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/application/Colors.cpp b/application/Colors.cpp
deleted file mode 100644
index 8812c93d..00000000
--- a/application/Colors.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "Colors.h"
-
-/**
- * Blend the color with the front color, adapting to the back color
- */
-QColor Color::blend(QColor front, QColor back, QColor color, uchar ratio)
-{
- Q_ASSERT(front.isValid());
- Q_ASSERT(back.isValid());
- if (Rainbow::luma(front) > Rainbow::luma(back))
- {
- // for dark color schemes, produce a fitting color first
- color = Rainbow::tint(front, color, 0.5);
- }
- // adapt contrast
- return Rainbow::mix(front, color, float(ratio) / float(0xff));
-}
-
-/**
- * Blend the color with the back color
- */
-QColor Color::blendBackground(QColor back, QColor color, uchar ratio)
-{
- // adapt contrast
- return Rainbow::mix(back, color, float(ratio) / float(0xff));
-}