-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
65 lines (42 loc) · 1.46 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?
if (!isset($_GET['hex'])) {
die("Please supply a hexadecimal value, <a href='?hex=FF0011'>example</a>");
}
require "ColorTool.php";
$color = new ColorTool();
$color->set_hex($_GET['hex']);
echo "<h4>Monochromatic</h4>";
$monochromatic = $color->monochromatic(10);
$color->display_hsls($monochromatic);
echo "<h4>Tones</h4>";
$tones = $color->tones(10);
$color->display_hsls($tones);
echo "<h4>Shades</h4>";
$shades = $color->shades(10);
$color->display_hsls($shades);
echo "<h4>Tints</h4>";
$tints = $color->tints(10);
$color->display_hsls($tints);
echo "<h4>Similar Colors</h4>";
$similar = $color->similar(10);
$color->display_hsls($similar);
echo "<h4>Complementary</h4>";
$complementary = $color->hue_shift(.5);
$color->display_hsl($complementary);
echo "<h4>Split Complementary</h4>";
$color->display_hsl($color->hue_shift(.55));
$color->display_hsl($color->get_hsl());
$color->display_hsl($color->hue_shift(.45));
echo "<h4>Analogous Colors</h4>";
$color->display_hsl($color->hue_shift(-.0833));
$color->display_hsl($color->get_hsl());
$color->display_hsl($color->hue_shift(.0833));
echo "<h4>Triadic Colors</h4>";
$color->display_hsl($color->hue_shift(-.333));
$color->display_hsl($color->get_hsl());
$color->display_hsl($color->hue_shift(.333));
echo "<h4>Tetradic Colors</h4>";
$color->display_hsl($color->hue_shift(-.14));
$color->display_hsl($color->get_hsl());
$color->display_hsl($color->hue_shift(.35));
$color->display_hsl($color->hue_shift(.49));