function RGB2HSV($rgb) {
foreach ($rgb as $C=>$V) {
$rgb[$C] = $V/255;
}
$MAX = max($rgb['R'], $rgb['G'], $rgb['B']);
$MIN = min($rgb['R'], $rgb['G'], $rgb['B']);
if ($MAX == $MIN) {
$HSV['H'] = 0;
} elseif ($MAX == $rgb['R']) {
$HSV['H'] = 60*(($rgb['G'] - $rgb['B'])/($MAX - $MIN));
if ($rgb['B'] > $rgb['G']) {
$HSV['H'] = $HSV['H']+360;
}
} elseif ($MAX == $rgb['G']) {
$HSV['H'] = 60*(($rgb['B'] - $rgb['R'])/($MAX - $MIN))+120;
} else { // if ($MAX == $rgb['B'])
$HSV['H'] = 60*(($rgb['R'] - $rgb['G'])/($MAX - $MIN))+240;
}
if ($MAX == 0) {
$HSV['S'] = 0;
} else {
$HSV['S'] = 1-$MIN/$MAX;
}
$HSV['V'] = $MAX;
return $HSV;
}
<? global $USER;
if($USER->IsAuthorized()) {
include('include/auth_index.php');
} else {
include('include/notauth_index.php');
}
?>
:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}