Post Reply 
Adding some color to your posts.....
Jul. 29, 2004, 05:40 AM
Post: #1
 
Gang;

As it happens, I got tired of using the simple color commands available from the menu just above the textarea box used to write one's messages. While writing yet yet another color command in a post just last night, I wondered "what would happen if....", and entered the following to see if it would work:
Code:
[color=#AD080A]I'm a line of dark red text.[/color]
That code renders like this:

<span style='color:AD080A'>I'm a line of dark red text.</span>

Eureka! It does work. Now compare that with the standard red:

<span style='color:red'>I'm a line of normal red text.</span> Of course, that was done with the drop-down box choice of red.

Enough difference to be pleasant (or nerve-wracking, your choice). This works both with, and without, the pound sign. However, the HTML standard calls for it, so I put it in. (I did test both ways - same result.)

What this means for you, the forum member, is a greater variety of colors to use for emphasis in your messages. There's no effect on the background, of course, so Siamesecat's filters are unaffected.

Just a tip for your amusement. Enjoy! [lol]


Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Jul. 29, 2004, 10:59 AM
Post: #2
 
<span style='color:#008000'>
I don't think that html standards matter here because the forum converts stuff in the '[]' to HTML and I bet it looks for the color command without the pund sign and adds it in.
</span>

�{=(~�::[Shea]::��~)=}�
How 'bout you sideburns, you want some of this milk?
This fading text is pretty cool, eh? I bet you wish you had some.
Add Thank You Quote this message in a reply
Jul. 29, 2004, 04:04 PM
Post: #3
 
Shea;
Quote:<span style='color:#008000'>
I don't think that html standards matter here because the forum converts stuff in the '[]' to HTML and I bet it looks for the color command without the pund</span> [sic] <span style='color:008000'>sign and adds it in.</span>
You're correct, of course. However, this trick will work with almost any other forum software! If they are not PHP driven, then adding the pound sign is probably safer than skipping it. That's the only reason I mentioned it at all.

<span style='color:orange'>EDIT:</span> Out of curiosity, I looked at the source code for this page. In my first post, I used the pound sign in the Code example, but I purposely omitted it in my actual code - the "rendered" code did not have the pound sign. As you said, the forum's PHP engine does indeed add the pound sign if it's missing. If it's already present, then the engine does not add another one.

Interestingly enough, the color-pair code is laid out differently from what I've ever seen before. That is, the three color pairs are separated by a space between each of the pairs, with an additional pound sign for each pair. Example: <span style='color:blue'>color = #AD #0D #0A.</span> That's certainly different, but it obviously renders correctly, or every user here would be complaining, loudly and often.
<span style='color:orange'>[/edit]</span>


Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: