PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Developer   DevColors   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of using
Class: DevColors
Converts color values between RGB and hexadecimal
Author: By
Last change:
Date: 17 years ago
Size: 683 bytes
 

Contents

Class file image Download
<?php
/**
* DevColors
*
* @category RGB, HEX colors
* @author Ahmed Abd el rahman (Developer) <addslashes@msn.com>
* @copyright 2007 ByPHP.NET
* @license GNU General Public Release v3
* @version Release: 1.0.0
* @link N/A
*/

// Including the class
require_once("class_devcolorsV4.php");

// Initlizing the class
$Dev = new DevColors();

// Converting from HEX to RGB
echo '<pre>White Color In RGB: ';
echo
'<br />';
// Example White
print_r($Dev->rgb("#FFFFFF"));
echo
'</pre>';

echo
'<br />';

// Converting from RGB to HEX
echo '<pre>White Color In HEX: ';
// Example White
echo $Dev->hex('255', '255', '255');
echo
'</pre>';
?>