aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index d626834c..a78e59bd 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -341,4 +341,12 @@ QString prettyPrint(const QString& plainText);
* \param dir path to cache directory relative to the standard cache path
*/
QString cacheLocation(const QString& dirName);
+
+/** Hue color component of based of the hash of the string.
+ * The implementation is based on XEP-0392:
+ * https://xmpp.org/extensions/xep-0392.html
+ * Naming and range are the same as QColor's hueF method:
+ * https://doc.qt.io/qt-5/qcolor.html#integer-vs-floating-point-precision
+ */
+qreal stringToHueF(const QString& string);
} // namespace QMatrixClient