-
Notifications
You must be signed in to change notification settings - Fork 103
Custom Color Schemes
Weechat-Android supports custom color schemes that modify WeeChat colors as well as some UI colors. Please take a look at the bundled color schemes for an example.
Note: color scheme file format changed slightly in version 0.14.
Color schemes are defined using text file. The file must end in
theme.properties
and placed in a folder named weechat
in your External
Storage, usually /storage/emulated/0/weechat
. You can check the exact location
in Settings
→ Theme
. Once the file is there, it should be available in the
list of color schemes.
Each file must conform to the java properties
file format, which mostly means
that lines are key = value
pairs, blank lines are ignored, and comments are on
their own line and start with a #
. Values are numbers between 0x000000
and 0xffffff
in
any format parsable by java. Most of the data is optional. The app understands
the following keys:
-
-
name
— name of the scheme -
default
— color of the text if it's not otherwise colored (default:color7
) -
default_bg
— background color of the chat area (default:color0
) -
primary
— primary UI color. used to color toolbars, menus, etc -
primary_dark
— if the Android version allows it, used to color status bar and navigation bar. The app will try to set the color of the foreground items (Back/Home buttons, Wifi indicator, etc) automatically, but earlier Android versions don't allow it. In this case, only dark colors can be used.
-
-
WeeChat sends the app colors in two ways. One is an explicit terminal color code, and another is an option name. In the latter case, it's up to Weechat-Android to decide which color to use. You can specify colors for the following options, as well as background colors, where applicable (e.g.
chat_highlight_bg
):-
separator
— not used (12/) -
chat
— welp.. (default
/default_bg
) -
chat_time
— used to color the time stamp (default
/) -
chat_time_delimiters
— not used (3/) -
chat_prefix_error
(11/) -
chat_prefix_network
(13/) -
chat_prefix_action
— the*
in* user slaps everyone
(15/) -
chat_prefix_join
—-->
(2/) -
chat_prefix_quit
—<--
(1/) -
chat_prefix_more
— the+
that appears after truncated nickname (5/) -
chat_prefix_suffix
(10/) -
chat_buffer
(15/) -
chat_server
(3/) -
chat_channel
(15/) -
chat_nick
(6/) -
chat_nick_self
— our own nick (15/) -
chat_nick_other
— nick of the person you are talking to in private (14/) -
chat_host
— color ofuser@host
(14/) -
chat_delimiters
—()
s and[]
s around (some) nicks and hosts (10/) -
chat_highlight
— highlights! works nicely with colorize_lines.pl (11/13) -
chat_read_marker
— read marker line. background value is not used (13/) -
chat_text_found
(11/5) -
chat_value
(14/) -
chat_prefix_buffer
(3/) -
chat_tags
(9/) -
chat_inactive_window
(8/) -
chat_inactive_buffer
— this colors “non-human lines” if the according option is set. background is ignored (8/) -
chat_prefix_buffer_inactive_buffer
(8/) -
chat_nick_offline
(8/) -
chat_nick_offline_highlight
(default
/8) -
chat_nick_prefix
— the<
before the nick (10/) -
chat_nick_suffix
— the>
after the nick (10/) -
emphasis
(11/13) (for some reason this isemphasized
in/iset
) -
chat_day_change
(14/)
In paretheses given are the default terminal colors that are used when the color scheme doesn't set the color for the option.
-
-
Terminal colors, whether received directly from WeeChat, or when using the default option colors, can be redefined using keys from
-
color0
,color0_bg
to -
color255
,color255_bg
.
This is especially useful when adjusting colors for the light background.
If you want to modify a lot of colors at once, it might be useful to use the included color scheme generator that builds color schemes from an image that has all the palette colors. You will have to edit
palettes.xcf
(a native Gimp format), extract the layers into individual files, and then compile the color schemes withextract_from_pngs.py
(requires Python3 and Pillow). Test your colors using commands generated withgenerate_test.py
. -