Joined: 2013-01-20 04:44:04
How To Change Script Editor Panel Colors To Colored Text On Dark Background.
By Kitto Flora Jan 11, 2017.
(CoolVL viewer only! Other viewers use different files and systems!)
NOTE: These changes were made to CoolVLViewer-1.26.20 on a 64-bit linux system.
If you want to make these changes on a different version you may find files
in different places.
I spend more than half my time in VR editing scripts, but I cannot stand
looking at the tiny text on that bright background for long. It gives me
'aura migraine' which is quite unpleasant. So here is a way to change the
display to have a dark background with light-colored text.
1) Part of this change requires changing a value in the source code
and re-compiling. You must be capable of doing that.
2) It also changes the Group Messages pop-up to white text on light-colored
background making it almost unreadable, but you can go read the message
in the Groups Panel, where it will be white on gray. I have been unable
to trace what sets the Group Messages pop-up background color, it is buried
somewhere in the source. If anyone can find it please let us know.
3) It changes the Note Card display to white on gray - but that is actually good.
Step 1. Change 'functions' color to light red:
Edit the source file ...linden/indra/newview/llpreviewscript.cpp
Search for the string "mEditor->loadKeywords"
Just above that you will see
Change that line to
LLColor3 color(0.99f, 0.1f, 0.1f);
What's going on here is that the code changes the color of keywords set
in other files to the colors set in those files, but LSL functions are
not listed any place else so they get this 'default' value.
Recompile the code.
All other color changes are in 'text' files that are read each time
CoolVL is started.
Step 2. Change background, cursor etc. colors:
Change to the skins/ directory that you will be using.
(If you run CoolVL out of an installed directory it is likely at
If you run out of the compiled directory it is likely at
(The values you will be changing are usually only in the default/colors_base.xml file,
but if you are using one of the other two skins and you have added the changed
value settings there, edit them there.)
The values to be changed are in the <!-- TEXTFIELDS --> section.
Change these listed values to the following:
<TextBgFocusColor value="5, 5, 5, 255" /> <!-- Text field background when receiving input (focused) -->
<TextBgReadOnlyColor value="100, 100, 100, 160" /> <!-- Text field background when read-only -->
<TextBgWriteableColor value="50, 50, 50, 230" /> <!-- Text field background when not receiving input (unfocused) -->
<TextCursorColor value="255, 255, 0, 255" />
<TextFgColor value="255, 255, 255, 255" />
<TextFgReadOnlyColor value="200, 200, 200, 200" />
<TextFgTentativeColor value="180, 180, 180, 180" />
<TextEmbeddedItemColor value="0, 0, 200, 255" />
<TextDefaultColor value="255, 255, 255, 255"/> <!-- Also script def. color i.e. variables, values, functions -->
Save the file.
Step 3. Change keyword colors:
In the skins/ directory selected as in Step 2
In this file the colors of the various keywords is defined in the
[word <r>, <g>, <b>] (etc.) statement after each # <heading>.
Allowed values are 0 to .99
Change the following:
[word .2, .2, .99]
# data types
[word .3, .99, .3]
[word 0, .6, .99]
# integer constants
[word .2, .2, .99]
# string constants
[word .2, .6, .99]
# float constants
[word .8, .4, .99]
# compound constants
[word .4, .4, .99]
# flow control keywords
[word .5, .5, .99]
# flow control label
[line .5, .5, .99]
[one_sided_delimiter .99, .6, .3]
[two_sided_delimiter .99, .6, .3]
# String literals
[two_sided_delimiter .2, .99, .2]
Save the file.
Thats it! Restart CoolVL and enjoy.
Joined: 2009-03-17 18:42:51
Yeah, LL didn't make custom skinning easy enough: there are still some hard-coded colors... But see below for good news.
You just need to change GroupNotifyBoxColor in colors_base.xml (example in the default skin, be aware that other skins being just overrides to the default one, their colors_base.xml may not hold all the existing settings).
It will actually change all text editors background color...
Good news: for the next release, I made this setting configurable from colors_base.xml (new "LslFunctionTextFgColor" color setting). You will not need to recompile the viewer any more for such a change.
Another piece of good news: I added the possibility, for next release, to define a "custom" skin. All you will have to do is creating a new "custom" directory in the Cool VL Viewer installation "skins" directory, and then to create at least a custom/colors_base.xml file (or copy the one from the default skin in custom/). Then you will be able to customize your skin (the customizations will override the default skin, so if you want, you may instead copy the overrides of the two other skins (sliver, dark) into custom/ and elaborate your customizations from them). Since the installer never removes files/folders that it does not know about, you will not have to worry about getting your custom skin overwritten/deleted during an update. I also added the possibility to select the custom skin (when it exists) from the Preferences panel, Skins tab.
That's another aspect of the "hardcoding" (even if not in code itself, at least in "static" configuration files that get overwritten at each update). I also fixed this issue for next release, and instead of hardcoding the colors in keywords.ini, I replaced the said colors triplets with a string corresponding to a color defined in colors_base.xml. So, starting with next release, all you will have to do is to customize the added "Lsl*FgColor" settings in colors_base.xml, and keywords.ini can be left untouched.