Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

[Answered] Change Background Colour

16 years ago
Hey guys, I figured out how you can change the background colour of all of your pages in a storygame. Just insert this into the Global Page Script:

$PAGETEXT := $PAGETEXT + "<body bgcolor='colournamehere'>"

This is very useful, as it can give your storygame a whole new look and feel to it. This is pretty much flawless, unless the background is black, because if it is you will not be able to see the Page Title in your storygame (which can be fixed if solostrike's $PAGETITLE request is completed). Oh, and for anybody who might need it, you can add this to change the default colour of the font on every page.

I'm so writing an article on this, and how you can change the Link Text around.

[Answered] Change Background Colour

16 years ago

that's excellent! However, is there a list of what colours can be accepted?

So far I've found:

blue, yellow, red, orange

I tried other colour words, but they either displayed blue or red, and not the colour I was after.

I would also caution people against making outlandish colour schemes - the most important thing is still readability. If it is awkward to read coloured text on your coloured background, then you might as well leave the screen white.

[Answered] Change Background Colour

16 years ago
You can either type in all the colours, or you can actually input the colour code (eg. black is #000000 and white is #FFFFFF). You can find out colours and what their colour codes are here.

[Answered] Change Background Colour

16 years ago
ahah nice, this and the linktext colour change are all going in my game enhancements article where im writing about using html to enhance the storygame...

[Answered] Change Background Colour

16 years ago
Oh okay, fair enough. You'll probably get it done quicker than I would anyway. It's your problem now :P

[Answered] Change Background Colour

16 years ago

o lol, if u wanna do it, lemme know, cuz i dunno when i am gonna get it done, its just that my article is based on enhancements with html and this falls under that...

[Answered] Change Background Colour

16 years ago
That's what I mean, you can't have two articles that do the same thing. That's pretty much all I was doing, just HTML in Link Text and HTML in Page Scripts, which I didn't realise you were writing. Didn't mean to steal your spotlight at all. If you're already writing it then I don't want to stop that. And I'm sure you had the idea first. Did you think of changing the background colour before I posted it here though (I've got a sneaking feeling you did)?

[Answered] Change Background Colour

16 years ago

I don't know a lot about html. How do you change the text colour globally? I put these in the global page script, but only the background colour was changed.

$PAGETEXT := $PAGETEXT + "<body bgcolor='FFCC99' font color='white'>"

and

$PAGETEXT := $PAGETEXT + "<body bgcolor='FFCC99'> <font color='white'>"

[Answered] Change Background Colour

16 years ago

hehe, alright, well it would make sense that you want all that stuff to apply BEFORE the page text, so change it to:

$PAGETEXT := "<body bgcolour='FFCC99'><font colour='white'>" + $PAGETEXT + "</font">

[Answered] Change Background Colour

16 years ago
ah! got it working. I needed the </font> on the end. Also, had to spell it color and not colour, or it ignored it.

[Answered] Change Background Colour

16 years ago
ahah! well it should read colour because everyone knows thats the most correct way of spelling it :P:P:P

[Answered] Change Background Colour

16 years ago
Oh.. yes, forgot to mention that. You can also change the default size and actual font by doing this:

$PAGETEXT := "<font size='4' color='red' face='Arial'>" + $PAGETEXT + "</font>"

You can put as many little font tricks as you want within one font, but they're the only three you can do. You can also put as many font tricks as you want in the <body> tag:

  • bgcolor changes the background colour
  • alink changes the colour of ALL links that haven't been clicked
  • background changes the background to an image (<body background="url">)
  • text can set the default text to a certain colour, but alas you'll have to use the formula I showed you above to change the default font
  • vlink changes the colour of ALL links that have been clicked
Hope that helps everyone (including Solo, but I'm sure he probably already knew all that).

[Answered] Change Background Colour

16 years ago

you were not stealing my spotlight at all! i was worried that i was doing that to you! lol, and no, i did not know about the background text, however, i did know about the link colour change thing and everything else lol! this is a good find by you btw lol!

is that alright if i put this stuff in the article?? or would you like to ?

[Answered] Change Background Colour

16 years ago
ROFLMAO THIS IS AWESOME!

[Answered] Change Background Colour

16 years ago

yep, pretty cool