Update color count in color extraction (#5270)

* Update color count in color extraction

* add the images
This commit is contained in:
Paulus Schoutsen 2020-03-18 20:12:27 -07:00 committed by GitHub
parent f9349bc731
commit eacf58b5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -34,6 +34,7 @@ export const createMediaPlayerEntities = () => [
media_content_type: "movie",
media_title: "Epic sax guy 10 hours",
app_name: "YouTube",
entity_picture: "/images/frenck.jpg",
supported_features: 33,
}),
getEntity("media_player", "living_room", "playing", {
@ -42,6 +43,7 @@ export const createMediaPlayerEntities = () => [
media_title: "Chapter 1",
media_series_title: "House of Cards",
app_name: "Netflix",
entity_picture: "/images/netflix.jpg",
supported_features: 1,
}),
getEntity("media_player", "sonos_idle", "idle", {

View File

@ -694,8 +694,10 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
return;
}
Vibrant.from(this._image)
.useGenerator(customGenerator)
new Vibrant(this._image, {
colorCount: 16,
generator: customGenerator,
})
.getPalette()
.then(([foreground, background]: [string, string]) => {
this._backgroundColor = background;