Some of my calendars do not display the color I set on the caldav server. Some other have the correct color. It is shown correctly on other clients (like DAVdroid).
Some debugging in kde-runtime/resources/dav/resource/davgroupwareresource.cpp, line 1366, DEBUG QColor(ARGB 1, 0.8, 0.192157, 0.486275) <= CORRECT DEBUG QColor(ARGB 1, 0.470588, 0.905882, 0.454902) <= CORRECT DEBUG QColor(ARGB 1, 0.701961, 0, 1) <= WRONG: should be (1, 1, 0.701961, 0) DEBUG QColor(ARGB 0.623529, 0.160784, 0.67451, 1) <= WRONG: should be (1, 0.623529, 0.160784, 0.67451) It seems that there is a rotation somewhere in the colors
Ok, the bug is in KDAv, in src/common/davcollectionsfetchjob.cpp, line 305: color.setNamedColor(colorValue); This waits a color of the type ARGB, whereas the dav proides a RGBA color, as specified by W3 [1]. Is it a Qt bug or should we implement it ourselves here? [1] https://www.w3.org/TR/2011/REC-css3-color-20110607/#foreground
Git commit 082b7e2a734ecace2e79cd2bad4d635aea7352cc by Olivier CHURLAUD. Committed on 12/06/2018 at 19:00. Pushed by ochurlaud into branch 'master'. Assign colors correctly also when the alpha channel is set. DAV colors are in the form RGBA, whereas QColor takes them as ARGB. Differential Revision: https://phabricator.kde.org/D13468 M +8 -1 src/common/davcollectionsfetchjob.cpp https://commits.kde.org/kdav/082b7e2a734ecace2e79cd2bad4d635aea7352cc