18#ifndef QGSCOLORUTILS_H
19#define QGSCOLORUTILS_H
26#include <QDomDocument>
55 static void writeXml(
const QColor &color,
const QString &identifier,
109 static QColorSpace
iccProfile(
const QString &iccProfileFilePath, QString &errorMsg
SIP_OUT );
117 static QString
saveIccProfile(
const QColorSpace &colorSpace,
const QString &iccProfileFilePath );
120#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
ColorModel
Color model types.
Contains utility functions for working with colors.
static QColor readXml(const QDomElement &element, const QString &identifier, const QgsReadWriteContext &context)
Reads a color from an XML element, matching the specified identifier string.
static void writeXml(const QColor &color, const QString &identifier, QDomDocument &document, QDomElement &element, const QgsReadWriteContext &context)
Writes a color to an XML element, storing it under the specified identifier.
static Qgis::ColorModel toColorModel(QColorSpace::ColorModel colorModel, bool *ok=nullptr)
Convert and returns Qt colorModel to Qgis::ColorModel.
static QColor colorFromString(const QString &string)
Decodes a string into a color value.
static QString colorToString(const QColor &color)
Encodes a color into a string value.
static QColorSpace iccProfile(const QString &iccProfileFilePath, QString &errorMsg)
Loads an ICC profile from iccProfileFilePath and returns associated color space.
static QString saveIccProfile(const QColorSpace &colorSpace, const QString &iccProfileFilePath)
Save color space colorSpace to an ICC profile file iccProfileFilePath.
A container for the context for various read/write operations on objects.