add sitemap
[contractdashboard.git] / lib / csscolor.test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
 
// Tell the browser that this is CSS instead of HTML
header("Content-type: text/css");
 
// Get the color generating code
include_once("csscolor.php");
 
// Set the error handing for csscolor.
// If an error occurs, print the error
// within a CSS comment so we can see
// it in the CSS file.
 
 
// Define a couple color palettes
$base = new CSS_Color('C9E3A6');
$highlight = new CSS_Color('746B8E');
 
// Trigger an error just to see what happens
// $trigger = new CSS_Color('');
 
?>
 
 
.box {
 
  /* Use the base color, two shades darker */
  background:#<?php echo $base->bg['-2'] ?>;
 
  /* Use the corresponding foreground color */
  color:#<?php echo $base->fg['-2'] ?>;
 
  /* Use the highlight color as a border */
  border:5px solid #<?php echo $highlight->bg['0'] ?>
 
}