Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Contrasting Colours

by msemtd (Scribe)
on May 29, 2003 at 21:03 UTC ( [id://261691]=note: print w/replies, xml ) Need Help??


in reply to Re: Contrasting Colours
in thread Contrasting Colours

BTW: that was me posting without logging in - oops!

I seem to have added an extra configure in there - the pick_n_mix callback now reads...

sub pick_n_mix { my ($btn) = @_; my $old = $btn->cget( -bg ); my $col = $mw->chooseColor( -title => "Choose a nice colour...", -initialcolor => $old ); return unless $col; # Choose a contrasting colour for text... my $fg = contrast_colour($col); $btn->configure( -bg => $col, -activebackground => $col, -fg => $fg, -activeforeground => $fg ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://261691]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found