App::KGB::Painter(3) add color to KGB notifications


App::KGB::Painter is a simple class encapsulating coloring of KGB messages.



 my $p = App::KGB::Painter->new({ color_codes => { ... }, style => { ... } } );

color_codes is a hash with the special symbols interpreted as coloring commands by IRC clients.

style is another hash describing what colors to apply to different parts of the messages.


colorize category text
Applies the colors of the style category to the given text.
colorize_change change
Given a change, applies colors to its files depending on the type of the change --- update, addition, deletion or property change.


Copyright (c) Damyan Ivanov <[email protected]>.

This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.