Navigation

 ·   Wiki Home
 ·   Wiki Help
 ·   Categories
 ·   Title List
 ·   Uncategorized Pages
 ·   Random Page
 ·   Recent Changes
 ·   RSS
 ·   Atom
 ·   What Links Here

Active Members:

Search:

 

Create or Find Page:

 

View Colors config file

The colors config file is a text file which tells MonkeyRecolor how to apply it's color settings to the style. You will find the default version installed in {AppData}/MonkeyRecolor with the name colors.txt. Use the Load item on the Colors menu to use a different file.

Each line takes the form
[<Path>][/<Class>][$<Trigger>[!]<value>[,[!]<value2>

Examples include:
backgroundstyle background
checkboxstyle
.background/TColorAnimation lowlights,highlights
checkboxstyle
.background.checkmark = !highlights
speedbuttonstyle
.background/TColorAnimation$IsMouseOver&3D;#;IsPressed&3Dfalse; = lowlights,highlights
.selection selection
/TGlowEffect gloweffect 

The left hand side specifies which component to apply changes to. The right hand side is the color or colors to apply. All child components of the specified component will also be given the same color(s) settings. The file is processed in order from top to bottom and any later settings will overwrite conflicting settings higher in the file. In other words, make general settings (eg. for the whole style) first and specify settings for child components later.

Component Specifiers

Path is the path to the object, separated by periods, where each path item is the style components StyleName property. If no StyleName is given for a component, then no entry will be made in the path for that component. E.g. if 'buttonstyle' has a child with no StyleName, which has a child called text then the path will be 'buttonstyle.text'.

A path which starts with a period applies to any component whose path ends thus. I.e. '.text' applies to 'button.text' and 'label.text' etc.

Sometimes you need to specify a component which hasn't been assigned a StyleName. If so, you can usually get around this with the Class item. The class is the components class (eg. TColorAnimation preceded by a forward slash.

This example:
checkboxstyle.background/TColorAnimation 

modifies any TColorAnimation components which are under the checkboxstyles background. Animations are often paired, one to 'switch on' a color change and one to 'switch' it off again. MonkeyRecolor is smart enough to know which is which and make the color changes correctly.

If the class is specified, the path can be left out and all components of that class will be modified. The following line:
/TGlowEffect gloweffect 

uses this to modify every TGlowEffect in the file.

Some components have multiple color animations to turn on and off different effects. Trigger can be used to distinguish them. It is used only for TColorAnimation objects. Only objects with a matching Trigger property will be affected. A # character in the Trigger phrase will be replaced with either true or false for matching purposes, i.e. to identify which animation turns the animation on and which turns it off (see Class above for more on this).

To 'quote' characters which would otherwise screw up parsing of the line, use the &xx; format, where xx is the hex code of the character to be inserted. (Currently this means = characters which would become &3D;)

An example:
speedbuttonstyle.background/TColorAnimation$IsMouseOver&3D;#;IsPressed&3Dfalse; = lowlights,highlights 

The trigger is converted to:
IsMouseOver=#;IsPressed=false 

which matches the TColorAnimations whose trigger properties are:
IsMouseOver=true;IsPressed=false 

and
IsMouseOver=false;IsPressed=false 


Again, MonkeyRecolor is smart enough to know which is the on and which the off component and modify their colors appropriately.

Value specifiers

Value is the value to apply: (See MonkeyRecolor Controls for more details).

background: background color
lowlights: usually similar to the background color but slightly highlighted, eg. backgrounds of scroll bars, combos, etc.
highlights: use the first secondary color
althighlights: use the second background color
selection: selected text of edits, lists, memos etc.
gloweffect: gloweffect color.

Values are normally calculated relative to original colors and target color, to set an absolute value, prefix the value with a !, e.g.
[codecheckboxstyle.background.checkmark = !highlights

Two values can be given for TColorAnimations. If given, the first will be used for the normal (false) state, and the second for the true state, e.g.
checkboxstyle.background/TColorAnimation lowlights,highlights 


General

All paths, classes, triggers and values are case insensitive

Use the word
end 

on a line on it's own to stop parsing this file early - useful for testing

To add a comment, start the line the a semicolon:
;This will be ignored 


Category:MonkeyRecolor

Categories: