Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Supported color names of Goo::Canvas (and Gtk2)

by kikuchiyo (Pilgrim)
on Dec 03, 2009 at 18:59 UTC ( #810908=perlquestion: print w/replies, xml ) Need Help??
kikuchiyo has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I'm writing a Gtk2 GUI application that uses Goo::Canvas to plot a data file. (zentara's Goo::Canvas Graphing demo helped a lot: I'm thankful for it.)

I saw in that demo and also in the example scripts that came with the module that it is possible to specify colors with their names, e.g.
my $circle = Goo::Canvas::Ellipse->new( $g, $cx, $cy, 3, 3, 'stroke-color' => 'red', # <===== LIKE THIS 'line-width' => 1);

What I was unable to find is an official list of such color names that are supported by Goo::Canvas.

Come to think of it, I couldn't find a list of color names that are supported by Gtk2/Cairo/Pango itself.

Are these two lists identical?

Am I correct in my assumption that these lists are also identical to that found in rgb.txt that defines color names for X11?

Replies are listed 'Best First'.
Re: Supported color names of Goo::Canvas (and Gtk2)
by Anonymous Monk on Dec 04, 2009 at 03:12 UTC
Re: Supported color names of Goo::Canvas (and Gtk2)
by zentara (Archbishop) on Dec 04, 2009 at 13:47 UTC
    .... i believe the list is the X11 rgb.txt on linux anyways ..... you might ask on the Perl/Gtk2 maillist for a definitive answer..... the closest thing i see is "perldoc Gtk2::Gdk::Colormap"..... where you can define your own map if you want far as a special Goo map of colors..... i think as a compliant Gtk2 will use whatever your other Gtk2 widgets have available.... one big happy family :-)

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://810908]
Approved by AnomalousMonk
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-02-21 07:33 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (275 votes). Check out past polls.