mart added a comment.
  First of all.. I love the idea! :)
  
  I wanted something like that, tough i had a slightly different approach.. i 
find the global average color usually producing a kinda washed down color (from 
what happens in the plasma mobile app startup screen)
  
  For another project i needed something along the lines, and ended up using a 
variant of the k-means clustering technique, so you have averages of the colors 
grouped in clusters by frequency which can generate interesting palettes to 
play with (then is trivial to add a global average if really needed).
  
https://towardsdatascience.com/extracting-colours-from-an-image-using-k-means-clustering-9616348712be
  
  the first implementation is there (i want a way better api for it to be 
integrated in kirigami tough)
  
https://invent.kde.org/kde/plasma-bigscreen/-/blob/master/components/imagepalette.h

INLINE COMMENTS

> colorutils.cpp:26
> +    connect(response.data(), &QQuickItemGrabResult::ready, &loop, 
> &QEventLoop::quit);
> +    loop.exec();
> +

sync calls should be avoided whenever possible

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D28134

To: cblack, #plasma, mart
Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, 
ahiemstra, davidedmundson, mart

Reply via email to