mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Update color count in color extraction (#5270)
* Update color count in color extraction * add the images
This commit is contained in:
parent
f9349bc731
commit
eacf58b5a5
BIN
gallery/public/images/frenck.jpg
Normal file
BIN
gallery/public/images/frenck.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
gallery/public/images/netflix.jpg
Normal file
BIN
gallery/public/images/netflix.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -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", {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user