-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
59 lines (52 loc) · 1.18 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
<?php
/* Script to get RDF about a colour URI
* supported path elements are
* http://...com/id/colour/00ff00
* and so on.
* see http://data.colourphon.co.uk/id/colour/7b3f47 as an example
*/
define('MORIARTY_DIR', '/var/www/lib/moriarty/');
define('MORIARTY_ARC_DIR', '/var/www/lib/ARC/');
define('CP_DEBUG', false);
require_once 'colourphonrdf.class.php';
$c = new ColourphonRdf();
// Debug junk here follows....
//
// print "From Hex: ";
// $testhex = "#C5003E";
// $testhex = "#0039F5";
// $testhex = "#FFED47";
// print $testhex;
//
// echo "<pre>";
// $c->set_hex($testhex);
//
// $rgb = $c->get_rgb();
// $hex = $c->get_hex();
// $hsl = $c->get_hsl();
//
// print_r($rgb);
// print_r($hex);
// print_r($hsl);
// echo "</pre>";
//
// print "<hr><br />From RGB: <pre> ";
// $c->set_rgb($rgb);
// $rgb = $c->get_rgb();
// $hex = $c->get_hex();
// $hsl = $c->get_hsl();
// print_r($rgb);
// print_r($hex);
// print_r($hsl);
// echo "</pre>";
//
// print "<hr><br />From HSL: <pre> ";
// $c->set_hsl($hsl);
// $rgb = $c->get_rgb();
// $hex = $c->get_hex();
// $hsl = $c->get_hsl();
// print_r($rgb);
// print_r($hex);
// print_r($hsl);
// echo "</pre>";
?>