<table><tr><td style="">mart created this revision.<br />mart added a reviewer: Kirigami.<br />Herald added a project: Kirigami.<br />Herald added a subscriber: plasma-devel.<br />mart requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29637">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>ImageColors is a class to extract color statistics out of an image. it supports <br />
as source :</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Grabbing a static frame out of any Item</li>
<li class="remarkup-list-item">A QImage or a QIcon (for instance coming from a QAbstractItemModel</li>
<li class="remarkup-list-item">An icon name from the theme</li>
</ul>

<p>By a pixel-by pixel analisys it uses a K-means clustering algorythm <br />
<a href="https://en.wikipedia.org/wiki/K-means_clustering" class="remarkup-link" target="_blank" rel="noreferrer">https://en.wikipedia.org/wiki/K-means_clustering</a><br />
that groups averages of colors group that have a computed "distance" less than an <br />
arbitrary value and so extracts a palette of the "dominant" colors of the image,<br />
having also other imformations such as the % occurrence of each cluster, a <br />
complementary color for each cluster, the global average color, the most <br />
"vibrant" color of the image, usable as an accent, and good colors for text and <br />
background, based on the extracted palette</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br /><div><strong>BRANCH</strong><div><div>mart/imageColors</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29637">https://phabricator.kde.org/D29637</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/colorutils.cpp<br />
src/colorutils.h<br />
src/imagecolors.cpp<br />
src/imagecolors.h<br />
src/kirigamiplugin.cpp<br />
tests/imagecolorstest.qml</div></div></div><br /><div><strong>To: </strong>mart, Kirigami<br /><strong>Cc: </strong>plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson, mart<br /></div>