Long-overdue, but I have a working version! I had to:

Et voila, a curses UI with an orange background and white text (tested on Perl 5.26):

use strict; use warnings; use Curses::UI '0.9609'; my $cui = Curses::UI->new( -color_support => 1, -clear_on_exit => 1 ); $cui->set_binding( sub { $cui->mainloopExit() }, "\cC" ); # Colors my $co = $Curses::UI::color_object; $co->define_color( 'wh', 999, 999, 999 ); # range [1, 999] # For some reason, I don't seem to be able to mix # standard colors with custom colors. $co->define_color( 'orange', 999, 599, 1 ); my $FG = 'wh'; my $BG = 'orange'; my @COLORS = ( ( map { ; $_ => $BG } qw(-bg -tbg -bbg -sbg) ), ( map { ; $_ => $FG } qw(-fg -tfg -bfg -sfg) ) ); $cui->set_color_fg($FG); $cui->set_color_bg($BG); # Widgets my $win = $cui->add( 'main-window', 'Window', -border => 1, -title => "Ce n'est pas une fenetre", -titlefullwidth => 1, @COLORS, ); $win->add( 'help', 'Label', -y => 1, -width => -1, -reverse => 1, -paddingspaces => 1, -text => "Howdy! Press Ctl-C to exit.", @COLORS, ); $cui->mainloop; $cui->leave_curses;

In reply to Re: [Unresolved] Curses::UI define_color by cxw
in thread [Unresolved] Curses::UI define_color by return0

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.