in reply to [Unresolved] Curses::UI define_color
doc says its a method, source code confirms , see for yourself
sub define_color { my $this = shift; my $name = shift; my ($r, $g, $b) = @_; return unless $r < 1000; return unless $g < 1000; return unless $b < 1000; return unless $r > 0; return unless $g > 0; return unless $b > 0; init_color($this->{ccount}, $r, $g, $b); $this->{cmap}->{$name} = $this->{ccount}; $this->{ccount}++; return 1; }
http://cpansearch.perl.org/src/MDXI/Curses-UI-0.9609/examples/demo-color shows a global color object you can use to define additional colors my $co = $Curses::UI::color_object;
so $Curses::UI::color_object->define_color(qw/ lorange 255 155 0 /);
http://search.cpan.org/grep?cpanid=MDXI&release=Curses-UI-0.9609&string=default&i=1&n=1&C=0, http://search.cpan.org/grep?cpanid=MDXI&release=Curses-UI-0.9609&string=define_color&i=1&n=1&C=0, http://search.cpan.org/dist/Curses-UI/MANIFEST
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Curses::UI define_color
by return0 (Acolyte) on Apr 16, 2013 at 20:55 UTC |