Forum Moderators: coopster
Ex.
test.php:
<link href="css/styles.php?t=<?php echo $theme;?>" rel="stylesheet type="text/css" />
css/styles.php:
div.footer {background: #<?php echo $t;?>}
In particular, to simulate a watermark effect, I'm passing two distinct RGB values: the first value (say, A) is for the background color, the second slightly lighter value (B) for the font color of large headers that appear in the foreground.
The result is a sort of alpha-transparence for foreground text.
The problem is that, for any background color A, I have to manually check the equivalent RGB value of a 10% lighter foreground color B.
I was wondering if there is a way for passing to the CSS stylesheet just the background color value and have a script do the job of calculating RGB values that are N% lighter or darker than the original color.
Any ideas?
I was just about to search for conversion formulas as I know our graphics developers do variations quite often with their software packages -- then a power outage struck.
I've not yet worked with shading variations in PHP, so I'm looking forward to your findings -- coopster