palette - Online Linux Manual PageSection : 3pm
Updated : 2020-11-09
Source : perl v5.32.0
Note : User Contributed Perl Documentation
NAMETk::palette − Modify the Tk color palette
SYNOPSIS$widget−>setPalette(background) $widget−>setPalette(name=>value?,name=>value ...?) $widget−>bisque
DESCRIPTIONThe setPalette method changes the color scheme for Tk. It does this by modifying the colors of existing widgets and by changing the option database so that future widgets will use the new color scheme. If setPalette is invoked with a single argument, the argument is the name of a color to use as the normal background color; setPalette will compute a complete color palette from this background color. Alternatively, the arguments to setPalette may consist of any number of name−value pairs, where the first argument of the pair is the name of an option in the Tk option database and the second argument is the new value to use for that option. The following database names are currently supported: activeBackground foreground selectColor
activeForeground highlightBackground selectBackground
background highlightColor selectForeground
disabledForeground insertBackground troughColor
setPalette tries to compute reasonable defaults for any options that you don't specify. You can specify options other than the above ones and Tk will change those options on widgets as well. This feature may be useful if you are using custom widgets with additional color options. Once it has computed the new value to use for each of the color options, setPalette scans the widget hierarchy to modify the options of all existing widgets. For each widget, it checks to see if any of the above options is defined for the widget. If so, and if the option's current value is the default, then the value is changed; if the option has a value other than the default, setPalette will not change it. The default for an option is the one provided by the widget (($w−>configure('option'))[3]) unless setPalette has been run previously, in which case it is the value specified in the previous invocation of setPalette. After modifying all the widgets in the application, setPalette adds options to the option database to change the defaults for widgets created in the future. The new options are added at priority widgetDefault, so they will be overridden by options from the .Xdefaults file or options specified on the command-line that creates a widget. The method bisque is provided for backward compatibility: it restores the application's colors to the light brown (``bisque'') color scheme used in Tk 3.6 and earlier versions.
BUGSThe use of option database names rather than the configure names is understandable given the mechanism (copied from Tcl/Tk), but is potentially confusing. The interpolation of different 'shades' of color used for 3D effects in 'RGB' space can lead to undesirable changes in 'hue'. Interpolation in 'HSV' (as used in Tk::ColorEditor) would be more robust and X11R5's color support probably even more so.
SEE ALSOTk::options
KEYWORDSbisque, color, palette 0
Johanes Gumabo
Data Size : 9,606 byte
man-Tk::palette.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 184,073
Visitor ID : :
Visitor IP : 3.142.255.103 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|b___isque.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|b___isque.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|b___isque.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|b___isque.3pm|43|'br══─}─══ |'br══─}─══
)