Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Color bug

BUG. If you have variables defining colors  – e.g. {$.backgroundcolor$} – in a template written in html view these variables will be replaced with arbitrary colors – e.g. #00e0cc – if you later make adjustments like inserting a link in Normal view, even if you always save from html view. There is no turning back. You will have to manually find and replace every random color for every variable in your template.

Jorgen Brenting
Monday, December 9, 2002

I use color variables without a problem now, but seem to remember some issue I had when first using them.

First, I define the variable like:


and not just the color code.

Second, I make sure there are no spaces in my variable.  Third, I add the color variable as the last item definition, be it either body, or table cell, etc.  Whatever it is, the color variable goes last.

Try this, and see if it help.

Jeff Kolker
Monday, December 9, 2002

Thanks  Jeff, but you missed the point. CD replaces variables from the varibales list with random color definitions. It simply overwrites the variables inside the template itself with real, but random, color numbers as described above. There is no problem if I use color numbers the way you suggest.

Jorgen Brenting
Monday, December 9, 2002

Well...I understood what you meant, as I had some weird things happening.

When you type your variable into the html template, are there any spaces?? 

do not do:  {$ .colorvar $}
try instead: {$.colorvar$}

and if i remember, as I said in my previous post, put the color variable as the last item....such as:

<TABLE cellSpacing=0 cellPadding=0 width="100%" align=None {$.FaraBackColor$}>

Like I said, I was having some weird things happen, but now my templates act fine.

Jeff Kolker
Monday, December 9, 2002

Thanks Jeff, but ...
No, there are no spaces. Yes, the color variable is the last item.
The random replacement only takes place if you switch between HTML view and Normal view, do something and return to HTML. I usually avoid the Normal view in templates, but this time I created a link in Normal view. When I returned to HTML view the color variables was gone. I have repeated the 'experiment', works every time. To my best knowledge this is a bug.

Jorgen Brenting
Monday, December 9, 2002

Jorgen is right - this has been bugging me for ages. I now leave all my templates in HTML view, and don't use Normal view.

A tip for next time: if you notice the colour screw-up soon enough after switching views, you can close the template without saving and reopen it. Of course, you lose unsaved work, so I'm now in the habit of saving before switching views.

Darren Collins
Monday, December 9, 2002

Darren, I'll follow your last advice until CD2 hopefully eliminates this bug.

Jorgen Brenting
Monday, December 9, 2002

*  Recent Topics

*  Fog Creek Home