Bixby Developer Center

References

color

optionalvalue optional

Specifies a text color. You should only use a text color to emphasize pieces of information. For example, if you have a stocks information capsule, you can use Green to indicate a stock is up and Red if the stock is down. If your capsule is used primarily in an Asian market, you can use Red to indicate a company is heating up and Blue to indicate that it's cooling down. Another example would be if you are tracking a flight. On-time flights can have their status in Green, delayed flights in Amber, and canceled flights in Red.

You can choose one of the following options:

  • Amber
  • Blue
  • Green
  • Red

If you don't specify a color, the default is color is dependent on the theme of the device.

Note

If you choose your text style as one of the *_Soft options, the color won't display. Text color is meant to emphasize information and can't be used with a *_Soft text style.

Example

...
single-line {
text {
value ("Stock market price is:")
}
spacer
if (stock.difference > 0) {
text {
color (Green)
value {
template ("#{value(stock.price)}")
}
}
}
else-if (stock.difference < 0) {
text {
color (Red)
value {
template ("#{value(stock.price)}")
}
}
}
else {
text { // will default to plain white text
value {
template ("#{value(stock.price)}")
}
}
}

}
...

Child Keys

value
optional
A value that matches one of the valid enumerated options of its parent key