Градиент

                        
<?php

function GradientLetter($text, $from='', $to='', $mode = 'hex') {

$text = iconv("UTF-8", "windows-1251", $text);
if ($mode == 'hex') {
$to = hexdec($to['0'].$to['1']).','.hexdec($to['2'].$to['3']).','.hexdec($to['4'].$to['5']);
$from = hexdec($from['0'].$from['1']).",".hexdec($from['2'].$from['3']).",".hexdec($from['4'].$from['5']);
}
if (empty($text)) return null; else $levels = strlen($text);
if (empty($from)) $from = array(0, 0, 255); else $from = explode(',', $from);
if (empty($to)) $to = array(255, 0, 0); else $to = explode(',', $to);#_9#$output = null;
for ($i = 1; $i <= $levels; $i++) {
for ($ii = 0; $ii < 3; $ii++) {
$tmp[$ii] = $from[$ii] - $to[$ii];
$tmp[$ii] = floor($tmp[$ii] / $levels);
$rgb[$ii] = $from[$ii] - ($tmp[$ii] * $i);
if ($rgb[$ii] > 255) $rgb[$ii] = 255;
$rgb[$ii] = dechex($rgb[$ii]);
$rgb[$ii] = strtoupper($rgb[$ii]);
if (strlen($rgb[$ii]) < 2) $rgb[$ii] = '0'.$rgb[$ii];

}

$output .= '<span style="color: #'.$rgb['0'].$rgb['1'].$rgb['2'].'">'.$text[$i-1].'</span>';
}
return iconv("windows-1251", "UTF-8", $output);
}
?>
3 12 0
0

Нет фото
• 19 янв 2013, 12:49


Хз *

0

Нет фото
Romasik * 1.79
• 19 янв 2013, 02:34


У вобли вроде такий код есть*

0

Нет фото
• 19 янв 2013, 00:53


А что за код Изображение

0

Нет фото
• 19 янв 2013, 00:08


Так и есть *

0

Нет фото
• 18 янв 2013, 23:27


Я думал грандиент это картинка вот такая Изображение