If it is just about doing it before it’s displayed, you could do it in the “preinitialize event” (click on the background to modify it). This part is executed before anything appears on the screen when loading the page.
Be careful with global components. A component has many attributes, all of which become global and take up space. This might not be an issue with smaller projects, but I’d consider it good practice to make only variables global. Those only have one attribute, their value. You can load the value from the global variable to your component in the preinitialize event. Not too much additional code, but a lot less RAM used.
What do I mean by “a lot less”? Take a simple number element. It uses 24 bytes of RAM, because it has not only a value, but also a font, a background color, a foreground color, a length and many other attributes that become global, too. A (numeric) variable takes up 4 bytes (since it is a 32bit variable).
When does it become an issue? Let’s say you want to keep 2/3 of your memory for the local components. That leaves 1/3 of 3584 bytes of RAM for global components. divide this by 24 bytes per global component and you get a limit of 50 global components. Sound like a lot? That’s 5 global components on 10 pages. Not that much actually. With the 4 byte variable you could have 300 global values instead. Isn’t that a much more comfortable limit?