Changing Tile Colors


#1

Is there any way to change the entire color of a tile? I know how to change the color of a button but with a tile 1x2 you get a squashed circle for the button and using colors looks odd.

Rookie coder here so be nice.

Thx.


#2

Bump. Guessing this is not possible?


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #3

What type of Tile?

  • standardTile?
  • valueTile?

valueTile color can be changed (RTMF :smiling_imp:)…
http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html#background-color


#4

A valueTile. I’ve done that as follows:

    valueTile("power", "device.power", width: 2, height: 1, decoration: "flat") {
        state "default", label: '${currentValue} W', backgroundColors:[
			[value: 0, color: "#44b621"],
			[value: 500, color: "#e86d13"],
			[value: 1000, color: "#d04e00"]

And i get this:

IMG_9178

I want to color the whole rectangle. Doesn’t look like there’s a way.

And yes, I had RTFM already … :wink:


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #5

Yah… that’s a shame.

  • I guess it depends on SmartThings’s definition of “background”.
  • I thought that decoration: "flat" should disable the Circle. I swear it did, actually. Maybe there’s a different flag?

Lemme search through the SmartThings Community GitHub (or have you checked?).


#6

Admittedly, no. Not totally fluent in finding my way around there yet.

I have to use the decoration: “flat” to get decent font sizing in iOS else the text is tiny. In other cases decoration: “flat” removes the circle button icon.

Thx


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #7

The option “foregroundColors” is present in a bunch of DTH’s that are not in GitHub (just search the Forum…), but I haven’t found evidence it ever worked and is likely deprecated now.


#8

Okay, thanks. Yeah, have not seen that in any doc.

UPDATE: While it doesn’t error out it just does nothing.

Thanks for trying to help!


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #9

No problem!

Though this Forum software needs to be able to modify the tag below my name from “HELPFUL” to “TRYING TO BE HELPFUL” :grimacing: :laughing: