Changing Default Menu Text Colors

"How to's" and tips and tricks - for all VSO products- not for questions!

Moderators: Cougar_II, ckhouston, JJ, Claire, Forum admin

Changing Default Menu Text Colors

Postby ckhouston » Sat Aug 29, 2009 4:50 pm

Note: This guide is for ConvertX 4 and below. Version 5 uses a different way of expressing colors as explained in version-5-menu-ini-file-colors-t18069.html.

If you have favorite text colors, you can make them your default rather than changing them each time you start CX2D

Open the template INI file in Notepad or another editor that can save in UTF-8 format. Scroll down to find sections labeled [CXT\TypeSettings\Item0, 1, etc.] - there will be a section for each type of text defined for the template (title, caption, etc.). There should be 4 color attributes defined in each section - background, outline, shadow and text color. These correspond to the 4 attributes you can change in the CX2D text style editor.

Understanding and changing the colors specified in the INI file is explained in another thread, but the two relative posts from it are presented below. Remember to save your changes in UTF-8 format and your new colors will be used the next time you start CX2D.

toaddub wrote:The number you see in the INI file is the ARGB color stored as integer with all 4 color components, {MSB} AA RR GG BB {LSB}. This is a color transform palette between ARGB color and DVD color.

MSB/LSB = Most Significant Bit/Least Significant Bit

So TextColor=-6579301 = FF9B9B9B (hex)
AA (Alpha channel) = FF = 255 => converted to Opacity value in editor is AA/255 * 100 = 100
RR (Red channel) = 9B = 155
GG (Green channel) = 9B = 155
BB (Blue channel) = 9B = 155

Button highlight color number uses the same concept with the exception of alpha/opacity/transparency value. Instead of dividing 255, you divide it by 15. This will be the transparency value in one of the 4 colors (b,p,e1,e2) comprised to make up a subpicture mask.


ckhouston wrote:Modifying templates is usually discouraged because it isn't easy without help from someone who has spent a lot of time figuring them out. I encourage anyone that wants to dig under the hood of any program aspect though because you may find something that benefits all of us. But don't expect anyone to take much time for tutoring or troubleshooting, you're basically on your own.

Changing default text colors is not hard, toaddub has given the basics. However, CX2D uses signed integers, apparently to save memory. The positive decimal range is 0 to 2147483647 (7FFFFFFF hex). It then wraps around to -2147483648 (-80000000 hex) and increases to -1. A positive number means the opacity is less than 50% while a negative one means it is 50% or more.

The easiest way to make hex-decimal conversions, especially with negative numbers (thanks to toaddub for the tip, it should have been obvious but I was hung up on doing conversions manually), is to use a scientific calculator.

Key in the number given in the template complete with sign, convert to hex, than convert the pairs of hex digits for each channel to decimal - they will be the in the familiar range of 0 to 255. Some calculators will pad negative numbers with leading pairs of FF hex instead of showing a negative number, ignore all but the last eight hex digits. Remember to divide the alpha (opacity) value by 255 to get percentage.

To work backwards, pick the 0 to 255 values you want for each channel, convert each to hex, combine them in the proper order to form an eight digit hex (if it is over 7FFFFFFF - it will be if you chose to use an opacity of 50% or more - , subtract 100000000 hex), then convert to decimal.

Button color schemes are more complicated, I haven't figured them out completely.

An Example: Suppose you want to use the pure blue color at 75% opacity for a text attribute. The alpha channel would have a decimal value of 255x75/100 = 191 so the decimal values of the channels arranged in ARGB order are 191, 000, 000 and 255. Changing each channel to hex and combining them in order as a single hex number gives BF0000FF. That is greater than 7FFFFFFF so subtract 100000000 hex and convert the result to dec gives - 1090518785.

That can be done a little different if you are careful to keep track of a lot of decimal digits. Convert the hex color to decimal and then, if that is more than 2147483647, subtract 4294967296.

Then using the example above, BF0000FF hex = 3204448511 dec. That is more than 2147483647, so subtract 4294967296 which again gives - 1090518785.


Footnote: Jacques, the program author, was kind enough to provide basic info about the color schemes.
ckhouston
 
Posts: 4590
Joined: Wed Aug 08, 2007 4:12 am

Return to Guides + Manuals

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests