Label Formatting

From DevWiki

Jump to: navigation, search

Applications,Boxee GUI API



In the Boxee framework, there are predefined font and color values. Labels can also be formatted using special tags in the text label property it self. The tags allow the use of different languages through a localization support, it enables the label to display application variables and system variables and it allow visual formatting of the label to bold, italics, full caps, lower case and colored, or all of them together.


Ever since the Beta release of Boxee, we've supported multiple font types. Currently there are 6 supported fonts, each with different styles to make up 130 different font variations. Any control type that allows a label or text field and be assigned a specific font. Fonts are set using the <font> tag.

Color Values

In Boxee, colors can be manually defined using the scheme AARRGGBB where AA is alpha blending value, RR is red, GG is green and BB is blue. All color values are in HEX values between 0-255.

Additionally there are built-in color names that allow any color tag in your skin to accept the word values below (<textcolor>red</textcolor>). All default colors are listed below but are subject to change between Boxee releases. Its best to use your own color codes to guarantee the colors in your application don't change if we change these default values:

Name Color Code
black F3000000
grey 80FFFFFF
gray 80FFFFFF
lightgrey 40FFFFFF
white F3FFFFFF
offwhite F3F1F1F1
blue F310B9F2
green F38EC641
yellow F3ECDB12
red F3F05322
disabled 30FFFFFF
title F3F6BB1C
listitem E6FFFFFF
wizard DD4D4D4D
darkgrey F3171717
medgrey F3999999
focus FF0FB9F1
offline FFFAA502
opaquegrey FF919191


Tag Usage Result Description
$INFO[] $INFO[ListItem.Title] Title of selected listitem in parent container Used for app/system variables. See InfoLabels
$LOCALIZE[] $LOCALIZE[11] Monday Used for localized strings. See Localization
[B] [B]Bold Text[/B] Bold Text Used for bold formatting.
[I] [I]Italic Text[/I] Italic Text Used for italic formatting.
[COLOR] [COLOR FF46E01B]Green[/COLOR] Green Used for color formatting.
[UPPERCASE] [UPPERCASE]Uppercase[/UPPERCASE] UPPERCASE Used for formatting text to uppercase.
[LOWERCASE] [LOWERCASE]Lowercase[/LOWERCASE] lowercase Used for formatting text to lowercase.
[CR] Example Text[CR]Is Fun Example Text
Is Fun
Carriage return (line break)
$COMMA With Love$COMMA Boxee. With Love, Boxee. Used for inserting "," into your label when using $INFO
$$ $$20 bucks $20 bucks Used for inserting "$" into your label when using $INFO

Parsing Tips


  1. <label>A good example of a $INFO[MusicPlayer.Title,song title: , $COMMA and a]$INFO[MusicPlayer.Artist, song artist:]</label>
If nothing is playing then the label will print
A good example of a
If a song is playing but it has no Title (ie MusicPlayer.Title returns an empty string) but does have an artist, it will return
A good example of a song artist: <Artist>
If a song is playing that has title and artist information, it will return
A good example of a song title: <Title>, and a song artist: <Artist>

  1. <label>This is a long label that features different [COLOR red]colors[/COLOR] and
  2. [I]styles[/I] and [B]looks[/B].[CR][LOWERCASE]$LOCALIZE[12345][/LOWERCASE] can be used to force a
  3. localize string to lowercase.[CR][UPPERCASE]$LOCALIZE[12345] else[/UPPERCASE] can be used to force
  4. a localize string to uppercase.</label>
This is a long label that features different colors, styles and looks.
something can be used to force a localize string to lowercase.
SOMETHING ELSE can be used to force a localize string to uppercase.
Personal tools