hyperamp icon indicating copy to clipboard operation
hyperamp copied to clipboard

Dynamic color

Open bcomnes opened this issue 8 years ago • 2 comments

Use album artwork to come up with a dynamic color scheme like iTunes does.

https://github.com/FormidableLabs/react-image-palette/blob/master/src/get-image-palette.js

Would be great to extract that out into its own module, and then consume it here.

qodsu

bcomnes avatar Nov 14 '17 17:11 bcomnes

There's color-thiefon NPM that could come in handy (it's not framework specific like react-image-palette):

var ColorThief = require('color-thief')

var colorThief = new ColorThief()
var color = colorThief.getColor(image)

You can also get multiple colors if needed (could be useful for finding complementary colors that are found in the album art) with colorThief.getPalette(image, numberOfColors)

kareniel avatar Nov 26 '17 20:11 kareniel

Nice find!

bcomnes avatar Nov 26 '17 23:11 bcomnes