The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ANSIColor::ToHTML - Create colored HTML from ANSI color description

SYNOPSIS

ACHTUNG! This is aplace holder. See "HTML::FromANSI first" in the meantime.

DESCRIPTION

Very simple module to produce colored html from ANSI color description. The generated code use pre tags. The generated code can also be embeded in your pod documentation.

DOCUMENTATION

Todo: Document the difference with HTML::FromANSI first

You can also generate uncolored text or text with ANSI codes instead for HTML.

colors:

  black  red  green  yellow  blue  magenta  cyan  white
  bright_black  bright_red      bright_green  bright_yellow
  bright_blue   bright_magenta  bright_cyan   bright_white

  on_black  on_red      on_green  on yellow
  on_blue   on_magenta  on_cyan   on_white
  on_bright_black  on_bright_red      on_bright_green  on_bright_yellow
  on_bright_blue   on_bright_magenta  on_bright_cyan   on_bright_white

Todo: insert a color chart in this document.

SUBROUTINES/METHODS

        $c = ANSIColor::ToHTML->new(Format => '' | 'ANSI' | 'HTML') ;

        $c->get_colors() ;
        $c->set_colors()
        
        $c->color(color, text | [text], text, ...) ;
        $c->color_all(color, text | [text, text], color, text, ...) ;
        $c->xmas_tree(text | [text], text, ...) ;
        $c->color({colors}, color ...) ;

new( xxx )

Create a ANSIColor::ToHTML .

  my $object = ANSIColor::ToHTML->new() ;

Arguments

  • $xxx -

Returns - Nothing

Exceptions

See xxx.

Setup

Helper sub called by new. This is a private sub.

CheckOptionNames

Verifies the named options passed to the members of this class. Calls {INTERACTION}{DIE} in case of error. This shall not be used directly.

A( xxx )

xxx description

  xxx some code

Arguments

  • $xxx -

Returns - Nothing

Exceptions

See xxx.

BUGS AND LIMITATIONS

None so far.

AUTHOR

        Nadim ibn hamouda el Khemir
        CPAN ID: NKH
        mailto: nadim@cpan.org

COPYRIGHT & LICENSE

Copyright 2010 Nadim Khemir.

This program is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or

  • the Artistic License version 2.0.

SUPPORT

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

    perldoc ANSIColor::ToHTML

You can also look for information at:

SEE ALSO

"HTML::FromANSI first"