DISCLAIMER

This software is currently under development. It is not done. While it will not be done quickly, contributions can help make things go faster. Please contribute if you can.

NAME

Convert::Color::IRC - Convert IRC colors to names or rgb hex codes.

VERSION

Version 0.04

SYNOPSIS

use Convert::Color::IRC qw(name_by_irc_color rgb_by_irc_color);
my $irc = 2; # blue
my $word = name_by_irc_color($irc) # Returns 'blue';
my $html = rgb_by_irc_color($irc) # Returns '0000FF';

DESCRIPTION

This module has been made for those that wish to interact between IRC and other mediums, such as websites. While not everyone is a fan of using colors with IRC, they are not going away any time soon. It is with this rationale that this module was made, to at least facilitate and easy conversion from IRC's codes to other formats.

SUBROUTINES/METHODS

name_by_irc_color

This function returns the color name most associated with the supplied IRC color.

The parameters are as follows:

  • $_[0]

    The IRC color code.

    Returns the color name on success, or nothing on failure.

rgb_by_irc_color

This function returns the hex representation of the supplied IRC color.

The parameters are as follows:

  • $_[0]

    The IRC color code.

    Returns the color name on success, or nothing on failure.

DIAGNOSTICS

No error messages are printed, and no exceptions are thrown. If the parameter passed in is not a number between 0 and 15, the functions just return;, which is equal to false.

CONFIGURATION AND ENVIRONMENT

There should be no issues with the environment this is placed in.

DEPENDENCIES

Perl 5.10 or higher is required due to the use of the given/when syntax. If heavily requested, I can work on a 5.8 compatible method of these functions.

INCOMPATIBILITIES

There are no known incompatibilities in this module.

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-games-rcp_framework at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Convert-Color-IRC. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR

Jason Felds, <wolfman.ncsu2000 at gmail.com>

ACKKNOWLEDGMENTS

A big thank you must be given to the CPAN Testers for catching ._ files in my archive, and the Freenode #Perl room for helping me handle this situation.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Convert::Color::IRC

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2008 Jason Felds, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.