made small VL wrapper around the
ColorThief library that allows to get color palettes and dominant color out of an
To install, go to Gamma’s command-line and type
nuget install VL.ColorThief -pre
as always, source patch is
December 4, 2019, 6:47pm
very nice, thanks.
it’s just a pity that the c# implementation differs from the js one. in my tests, it fails for the dominantcolor, where it makes an averagecolor instead of the most dominant one.
as a workaround, i sorted the palette output by popolation (orderbydescending) and used the first slice as dominant color. at least that comes close to the original js imp.
i used this for comparison:
thanks for the feedback!
just pushed a new
GetColor (Sorted) node that uses the algorithm you described, seems much more accurate in some cases indeed.
Jan 2020 update : thanks to @sebl, you can now also extract color palettes from files and bitmaps, instead of only
i was wondering if this only works in vl with skimage? Is there an image or dx11texture example?
Its a really awesome plugin and would like to use it in vvvvland :)
it should work if you use
AsImage to input the DX11 texture in vlllland, and then use
FromImage (Bitmap) with the bitmap versions of the ColorThief nodes.
note there still seems to be a bug with
ColorThief as described here, just tried on b39 here with no luck :(
January 14, 2020, 6:37pm
there’s also an overload that works on images (has fromImage inside)
but also no idea if it works in b39 though