| 1 | // Copyright (C) 2024 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QCOLORUTIL_P_H |
| 5 | #define QCOLORUTIL_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/qtconfigmacros.h> |
| 19 | |
| 20 | QT_BEGIN_NAMESPACE |
| 21 | |
| 22 | class QColor; |
| 23 | |
| 24 | // Considers two colors equal if their YUV components are |
| 25 | // pointing in the same direction and have similar luma (Y) |
| 26 | bool fuzzyCompare(const QColor &lhs, const QColor &rhs, float tol = 1e-2f); |
| 27 | |
| 28 | QT_END_NAMESPACE |
| 29 | |
| 30 | #endif |
| 31 | |