|
1 | 1 | <?php |
2 | | -include '../RandomColor.class.php'; |
| 2 | +include '../src/RandomColor.php'; |
| 3 | +use \Colors\RandomColor; |
3 | 4 | ?> |
4 | 5 | <!DOCTYPE html> |
5 | 6 | <html lang="en"> |
|
70 | 71 | <?php $c = RandomColor::one(array('format'=>'hsv','luminosity'=>'dark')); ?> |
71 | 72 | <pre> |
72 | 73 | RandomColor::one(array('format'=>'hex')); |
73 | | - <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// "' . RandomColor::format($c, 'hex') . '"</span>'; ?> |
| 74 | + <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// "' . RandomColor::hsv2hex($c) . '"</span>'; ?> |
74 | 75 |
|
75 | 76 |
|
76 | 77 | RandomColor::one(array('format'=>'hsv')); |
77 | | - <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace("/[\\r\\n ]+/", '', var_export($c, true)) . '</span>'; ?> |
| 78 | + <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\s+|,\s+(\))/', '$1', var_export($c, true)) . '</span>'; ?> |
78 | 79 |
|
79 | 80 |
|
80 | 81 | RandomColor::one(array('format'=>'hsl')); |
81 | | - <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace("/[\\r\\n ]+/", '', var_export(RandomColor::format($c, 'hsl'), true)) . '</span>'; ?> |
| 82 | + <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\s+|,\s+(\))/', '$1', var_export(RandomColor::hsv2hsl($c), true)) . '</span>'; ?> |
82 | 83 |
|
83 | 84 |
|
84 | 85 | RandomColor::one(array('format'=>'rgb')); |
85 | | - <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace("/[\\r\\n ]+/", '', var_export(RandomColor::format($c, 'rgb'), true)) . '</span>'; ?> |
| 86 | + <?php echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\s+|,\s+(\))/', '$1', var_export(RandomColor::hsv2rgb($c), true)) . '</span>'; ?> |
86 | 87 |
|
87 | 88 |
|
88 | 89 | RandomColor::one(array('format'=>'hslCss')); |
|
0 commit comments