Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named colors ('green') not supported #112

Closed
metbril opened this issue Feb 7, 2017 · 3 comments
Closed

Named colors ('green') not supported #112

metbril opened this issue Feb 7, 2017 · 3 comments

Comments

@metbril
Copy link

metbril commented Feb 7, 2017

The current version of the iOS app does not support the generally agreed standard codes for valuecolor.

The documentation on colors for sitemaps lists a table with named color values (e.g. 'red', 'green', 'blue') that should be supported across UIs (see my boldified text).

Below you can find a list of standard colors and their respective RGB color code. Please take note, that other colors can be used. It is generally expected that valid HTML colors will be accepted (e.g. “green”, “lightgrey”, “#334455”), but a UI may only accept internally defined colors or work with a special theme. The given color names are agreed on between all openHAB UIs and are therefor your safest choice.

The current workaround is to use HTML hex RGB codes instead, but I feel that at least the named colors in the docs table should be respected.

https://community.openhab.org/t/openhab2-valuecolor-not-changing-in-ios-app/14831/2

@ThomDietrich
Copy link
Member

ThomDietrich commented Feb 19, 2017

That's indeed unfortunate. One goal of sitemap definitions is that they should produce the same view on all clients.

@digitaldan any chance you could have a look?

@Rtvb fixing this issue might actually be easy. The interesting code part seems to be here. valuecolor/labelcolor are String members, you just need to add a translation from colorname to hex or UIColor.

@metbril
Copy link
Author

metbril commented Aug 19, 2017

I have created a PR openhab/openhab-docs#478. Please remember to also revert that when this issue is resolved.

@ThomDietrich
Copy link
Member

@digitaldan I've merged the warning about this limitation (see PR above) into docs. However this is of course not the solution we should settle with. Any plans when or if to work on this issue on your side? Best regards!

tefinger added a commit to tefinger/openhab.ios that referenced this issue Oct 12, 2017
List of supported colors: http://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors

Fixes openhab#112

Signed-off-by: Tobias Efinger <tobias@efinger.me> (github: tefinger)
tefinger added a commit to tefinger/openhab.ios that referenced this issue Nov 22, 2017
…ariable inside the method.

List of supported colors: http://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors

Fixes openhab#112

Signed-off-by: Tobias Efinger <tobias@efinger.me> (github: tefinger)
digitaldan pushed a commit that referenced this issue Nov 23, 2017
* Add support for named colors
List of supported colors: http://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors

Fixes #112

Signed-off-by: Tobias Efinger <tobias@efinger.me> (github: tefinger)

* Init dictionary of named colors as a class field instead of a local variable inside the method.

List of supported colors: http://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors

Fixes #112

Signed-off-by: Tobias Efinger <tobias@efinger.me> (github: tefinger)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants