metbril / openhab-mdi

openHAB Material Design Icons
GNU General Public License v3.0
8 stars 3 forks source link

Color Improvements #5

Open mueller-ma opened 7 years ago

mueller-ma commented 7 years ago

Hi,

I have a few suggestions:

metbril commented 7 years ago

Good suggestions. I'll give it some thought how to implement this, but feel free to submit one or more PR's.

If the repo becomes of more importance, we can always try to move in to the openhab organization https://github.com/openhab ;-)

mueller-ma commented 6 years ago

From this discussion https://github.com/openhab/openhab2-addons/issues/2139#issuecomment-331795651 it's clear that different backgrounds are not really wanted serverside in openhab, so we should forgot about this idea.

For generall color improvments: I would change the attribute "color" to "colorState" (Color based on the item state) and add "colorRandom" ("Random" color. I use quotation marks, because these colors should be hard coded to have the same color on every run and to ensure some icons have a specific color (e.g. fire should be red)) and "colorCombined" (Use random color if no state color is present). The color used should be configurable via a cli arg.

Also I would like to add the argument "--color" which overrides all colors defined in the yaml.

mueller-ma commented 6 years ago

Variable names for colors instead of their hex code are IMO better readable.

Edit: I see that you recently change name to hex code. Is there any reason I missed?

metbril commented 6 years ago

You are correct, it makes more sense to use named colors. However, I don’t think the material design colors you also suggested have names. My initial reason for using hex codes was because the iOS app did not support named colors. I am unsure it does now for any arbitrary color.

See issue https://github.com/openhab/openhab.ios/issues/112 and PR https://github.com/openhab/openhab.ios/pull/131