Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

G'day Discipulus,

Unfortunately, it looks like you don't have a true color terminal. See "Term::ANSIColor - Supported Colors" for more about that.

I got similar errors to what you're seeing when making a typo while developing and testing. This sort of thing:

$ perl -E 'use Term::ANSIColor; say colored("black on white", "r0g0v0 +on_white")' Invalid attribute name r0g0v0 at -e line 1.

However, there's no typo that I can see in what you've posted. You could do a couple of tests outside of my script.

$ perl -E 'use Term::ANSIColor; use Data::Dump; my $x = colored("black + on white", "r0g0b0 on_white"); say $x; dd $x' black on white "\e[38;2;0;0;0;47mblack on white\e[0m" $ perl -E 'say "\e[38;2;0;0;0;47mblack on white\e[0m"' black on white

Both of those give me the text "black on white" in black on a white background.

I don't have a Perl on an MSWin platform to test. I don't know about dumb and not dumb TERM values. For what it's worth:

$ echo $TERM xterm

Sorry I can't be of more help. Is there anything in AM's post that's useful for you?

Edit (stupid typo fix): s/white foreground/white background/.

— Ken

In reply to Re^4: 'rgb_palette' - Term::ANSIColor Helper -- errors on strawberry by kcott
in thread 'rgb_palette' - Term::ANSIColor Helper by kcott

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-10-04 03:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found