User Tools

Site Tools


themes

Themes

Theming is only available since AndroIRC 4.0

Starting with AndroIRC 4.0, basic support for themes has been added. It allows power users to customize text colors and text patterns used by AndroIRC. A complete example of the classic theme is given below.

Theme format

Basic theme skeleton is:

<?xml version="1.0" encoding="UTF-8"?>
<theme>
  <name>Classic</name>
  <author>Madalynn</author>
  <email>contact@androirc.com</email>
  <version>1.0.0</version>
  <parent_theme>light</parent_theme>
</theme>

Name, author, email and version will be used for credit and theme selection.

parent_theme must be set to either light or dark, depending on what background color you want.

Colors

Colors are in HTML format.

mIRC colors

You can customize the way mIRC colors are rendered. Standard mIRC colors are:

  • 0 white
  • 1 black
  • 2 blue (navy)
  • 3 green
  • 4 red
  • 5 brown (maroon)
  • 6 purple
  • 7 orange (olive)
  • 8 yellow
  • 9 light green (lime)
  • 10 teal (a green/blue cyan)
  • 11 light cyan (cyan) (aqua)
  • 12 light blue (royal)
  • 13 pink (light purple) (fuchsia)
  • 14 grey
  • 15 light grey (silver)

You can change a color using the following syntax:

  <colors>
    <mirc>
      <color id="0">#ffffff</color>
    </mirc>
  </colors>

AndroIRC colors

You can change AndroIRC colors the same way you can change mIRC colors. Only difference is that, instead of beeing referenced with integer indexes, AndroIRC colors are referenced by a string key.

  <colors>
    <androirc>
      <color id="text_light">#808080</color>
    </androirc>
  </colors>

A list of all valid keys is given below.

Patterns

For the moment, you can change two patterns: the “message” pattern and the “action” one. The first one is used each time a message is received. The second is used when an action message is shown (/me).

There're some placeholders that will be replaced by their values :

  • rank: the message owner user rank (%, @, +, etc.)
  • nick: the message owner user nick
  • message: the message

Additionally, you can use formatting tags like color, bold, and backgroundcolor. Support for italic will come later.

Example theme: Classic theme

<?xml version="1.0" encoding="UTF-8"?>
<theme>
  <name>Classic</name>
  <author>Madalynn</author>
  <email>contact@androirc.com</email>
  <version>1.0.0</version>
  <parent_theme>light</parent_theme>
  <colors>
    <mirc>
      <color id="0">#ffffff</color>
      <color id="1">#000000</color>
      <color id="2">#00007f</color>
      <color id="3">#009300</color>
      <color id="4">#ff0000</color>
      <color id="5">#7f0000</color>
      <color id="6">#9c009c</color>
      <color id="7">#fc7f00</color>
      <color id="8">#ffff00</color>
      <color id="9">#00fc00</color>
      <color id="10">#009393</color>
      <color id="11">#00ffff</color>
      <color id="12">#0000fc</color>
      <color id="13">#ff00ff</color>
      <color id="14">#7f7f7f</color>
      <color id="15">#d2d2d2</color>
    </mirc>
    <androirc>
      <color id="text_light">#808080</color>
      <color id="error">#ab383b</color>
      <color id="information">#2a4162</color>
      <color id="misc">#6e6885</color>
      <color id="highlight">#ab383b</color>
      <color id="join">#4f7495</color>
      <color id="part">#638d69</color>
      <color id="away">#4f7495</color>
      <color id="quit">#783431</color>
      <color id="mode">#638d69</color>
      <color id="nick">#b49457</color>
      <color id="invite">#b49457</color>
      <color id="topic">#2a4162</color>
      <color id="whois">#2a4162</color>
      <color id="ping">#ab383b</color>
      <color id="ctcp">#ab383b</color>
      <color id="notice">#783431</color>
      <color id="raw">#ab383b</color>
      <color id="connexion">#2a4162</color>
      <color id="disconnexion">#2a4162</color>
      <color id="stars">#808080</color>
      <color id="state_hl">#638d69</color>
      <color id="state_newmessage">#ab383b</color>
      <color id="state_systemmessage">#6e6885</color>
      <color id="title">#4f7495</color>
      <color id="operator">#783431</color>
      <color id="half_operator">#638d69</color>
      <color id="voice">#2a4162</color>
    </androirc>
  </colors>
  <patterns>
    <pattern name="message"><bold><color color="#b49457">(</color></bold><bold><color color="#7e93b0">%rank%</color></bold>%nick%<bold><color color="#b49457">)</color></bold> %message%</pattern>
    <pattern name="action"><color color="#6e6885">* %rank%%nick% %message%</color>
    </pattern>
  </patterns>
</theme>
themes.txt · Last modified: 2015/02/05 12:04 (external edit)