diff --git a/src/core/symbology/qgssymbol.cpp b/src/core/symbology/qgssymbol.cpp index 7cc92f51a8ed..0df9346fdcb7 100644 --- a/src/core/symbology/qgssymbol.cpp +++ b/src/core/symbology/qgssymbol.cpp @@ -864,6 +864,16 @@ QgsSymbol *QgsSymbol::defaultSymbol( Qgis::GeometryType geomType ) s->setColor( QgsApplication::colorSchemeRegistry()->fetchRandomStyleColor() ); } + const bool isCmyk = QgsProject::instance()->styleSettings() && QgsProject::instance()->styleSettings()->colorModel() == Qgis::ColorModel::Cmyk; + if ( s->color().spec() == QColor::Spec::Rgb && isCmyk ) + { + s->setColor( s->color().toCmyk() ); + } + else if ( s->color().spec() == QColor::Spec::Cmyk && !isCmyk ) + { + s->setColor( s->color().toRgb() ); + } + return s.release(); }