2014-10-12, 00:10
As the subject says, this is entirely a proof of concept - posted in case it inspires others. Whilst I will probably take it through to be a useable script for my own skin (which will likely never be on the repo), I probably won't personally take it through to being a useable script for any skin on the repo. Having said that...
Fanart is a popular option with users, but it creates a problem for skinners - because the franart can be any color, it's difficult to create a UI which overlays on that image (whilst being translucent) and still allows the UI to be readable.
That set me working on a script which analyses the franart displayed (and, indeed, any playing video) and provides UI colors to display on top of it, as available here: https://github.com/unfledged/service.auto.ui.colors, and shown in these screenshots:
As said, it's a proof of concept rather than a useable script - if you were interested in adapting it for your own skin (and I'm sure others can come up with far better usages than I can!), you'd need to edit line 96 of service.py to recognise your skin, and use following $VAR's for your colors:
Gaze-Focused
Gaze-UnFocused
Gaze-Selected
Gaze-Complimentary (Overlay color)
Gaze-Complimentary2 (Alternative overlay color)
To be clear, the image used for generating the colors are based on
$INFO[ListItem.Art(fanart)
$INFO[Container(9002).ListItem.Art(fanart)] - My own skins home page widgets
Skin.String(backgroundColor)
Or the average color of the currently playing video.
(Edit: Just to try and belay any questions - ideally, the color would be based itself on a $VAR which, when set, would grab its value from a Skin.String or similar, or grab from a default value - but this lead to crashes (whilst testing on OS X) particularly when changing views from, for example, Home.xml to My*Nav.xml - so now grabs the image directly from the listitem.)
Hope this inspires someone
(And to be clear, the biggest issue - Kodi can't assign label2 colors via a $VAR - so Settings*.xml, VideoOSDSettings.xml, and any other xml file which uses label2 can't use this method successfully.)
Fanart is a popular option with users, but it creates a problem for skinners - because the franart can be any color, it's difficult to create a UI which overlays on that image (whilst being translucent) and still allows the UI to be readable.
That set me working on a script which analyses the franart displayed (and, indeed, any playing video) and provides UI colors to display on top of it, as available here: https://github.com/unfledged/service.auto.ui.colors, and shown in these screenshots:
watch gallery
As said, it's a proof of concept rather than a useable script - if you were interested in adapting it for your own skin (and I'm sure others can come up with far better usages than I can!), you'd need to edit line 96 of service.py to recognise your skin, and use following $VAR's for your colors:
Gaze-Focused
Gaze-UnFocused
Gaze-Selected
Gaze-Complimentary (Overlay color)
Gaze-Complimentary2 (Alternative overlay color)
To be clear, the image used for generating the colors are based on
$INFO[ListItem.Art(fanart)
$INFO[Container(9002).ListItem.Art(fanart)] - My own skins home page widgets
Skin.String(backgroundColor)
Or the average color of the currently playing video.
(Edit: Just to try and belay any questions - ideally, the color would be based itself on a $VAR which, when set, would grab its value from a Skin.String or similar, or grab from a default value - but this lead to crashes (whilst testing on OS X) particularly when changing views from, for example, Home.xml to My*Nav.xml - so now grabs the image directly from the listitem.)
Hope this inspires someone
(And to be clear, the biggest issue - Kodi can't assign label2 colors via a $VAR - so Settings*.xml, VideoOSDSettings.xml, and any other xml file which uses label2 can't use this method successfully.)