PDA

View Full Version : Theme Extension Font Color Modification



ZenGhost
April 19th, 2020, 15:11
Apologies if this has been asked before. Couldn't find an exact answer. I also didn't see any attachments for Jeff's Simple Extension Tutorial, so couldn't download that to read. I am working with a Esper Genesis Theme Extension written for the 5e Ruleset.
Problem: Font color text field titles are a shade of yellow on beige background. Barely legible. I'm barely XML capable and completely clueless on LUA. All color tags found in any XML files in the unpacked .ext directories and files specify #620000, which is a maroon color that I don't even see on my FG desktops or windows.
Approach: Trying to find and modify the color reference tag to change the text field titles in all pop-up windows like the Character Sheet.
Request: Please help me find the location and show me what to change.
Here's the code in extension.xml under the campaign folder...
<?xml version="1.0" encoding="iso-8859-1"?>

<root version="3.0" logo="logo.png">
<announcement text="Esper Genesis Theme v1.0\rfor Fantasy Grounds\rCopyright 2019 Alligator Alley Entertainment." font="emotefont" icon="extensionlogo_5E_wotc" />


<properties>
<name>Esper Genesis 5E Theme</name>
<version>1.0</version>
<author>Zeus & Raddu</author>
<description>Esper Genesis Theme based on 5e theme by Zeus</description>
<ruleset>
<name>5E</name>
<minrelease>3</minrelease>
</ruleset>
</properties>

<base>
<script name="5EThemeWizards">
function onInit()
OptionsManager.addOptionValue("DDCL", "option_val_DDCL_ddbase", "desktopdecal_ddbase", true);
OptionsManager.setOptionDefault("DDCL", "desktopdecal_ddbase");OptionsManager.addOptionValue("DDCL", "option_val_DDCL_ddlogo", "desktopdecal_ddlogo", true);

DesktopManager.setStackOffset(56, 2, 4, 0);
DesktopManager.setUpperDockOffset(52, 5, 2, 0);
DesktopManager.setLowerDockOffset(52, 5, 2, 5);
end
</script>

<hotkeybar>
<title frame="hotkeytitlebox" frameoffset="2,-2,5,2" margin="2,0" font="hotkey" />
</hotkeybar>

<string name="option_val_DDCL_ddbase">D&amp;D Short</string>
<string name="option_val_DDCL_ddlogo">D&amp;D Long</string>

<!-- Only overriding title and header fonts due to quality issues with font bitmaps -->
<includefile source="graphics/graphics_buttons.xml" />
<includefile source="graphics/graphics_icons.xml" />
<includefile source="graphics/graphics_frames.xml" />
<includefile source="graphics/graphics_fonts.xml" />

<includefile source="common/template_common.xml" />
<includefile source="common/template_lists.xml" />
<includefile source="common/template_windows.xml" />
<includefile source="common/template_records.xml" />

<includefile source="campaign/template_campaign.xml" />
<includefile source="desktop/desktop_classes.xml" />
<includefile source="ref/template_ref.xml" />
<includefile source="utility/template_utility.xml" />
<includefile source="ct/template_ct.xml" />
<includefile source="ps/template_ps.xml" />
</base>
</root>

ZenGhost
April 19th, 2020, 16:14
All,
I stumbled upon the location of the font colors. \graphics\graphics_font.xml. I changed the color hex code. Just had a good test on FG.

ScarlettHellion
May 7th, 2020, 00:13
So how would you change that to make the text color different?

ZenGhost
May 7th, 2020, 05:02
So how would you change that to make the text color different?

Before you change anything make a backup copy of the extension file, in case things go sideways.

First, figure out what the color of the text you want to change, such as window titles like “Character Selection” or “Items” or text field titles like in the character sheet such as “Class” or “Race” or “Background”. Remember those colors in general like Black or Maroon.

In the XML file, you will find font color references e.g., color 6500FF.

Look up what those six digit colors numbers actually look like, by google-ing a hex code color tool or use https://htmlcolorcodes.com/ That tool should allow you to enter those six digits to show you what that color actually looks like.

Figure out which color codes in the XML line code matches the color of the actual text you want to change, e.g. Maroon = B80000

Then use that tool to select a color on the palette spectrum, and it will spit out the six digit code for the desired color.

Just change the six digit number in the XML line code to the color hex code you want. But make sure you jot done all the text colors you want to change so you wont have to keep going back and forth, saving you some time.

Example: Let’s say you want to change all the Maroon text to Black text. In the XML find all the color entries for B80000(Maroon) and change it to 000000 (Black). Then save the file. Repack all the files/folders back to one zip file and change the file extension to “.ext”. You’re done.

I hope this helps. Remember, I’m not an XML guru, I’m just a persistent hack, who has a spent a lot of time doing trial and error. Good luck!