Login   Register  
PHP Classes
elePHPant
Icontem

File: Example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Er. Rochak Chauhan  >  WebSafeColors.inc.php  >  Example.php  >  Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: WebSafeColors.inc.php
Lookup and retrieve colors of the Web Safe palette
Author: By
Last change: Optimized the class and added a new function to return the closest webSafeColor name. (as Suggested by Phil)
Date: 9 years ago
Size: 574 bytes
 

Contents

Class file image Download
<?php

error_reporting
(E_ALL);
ini_set("display_errors",1);


//example script
require_once('WebSafeColors.inc.php');

$webSafeColors = new WebSafeColors;

//$webSafeColors->displayColorDatabase();
//$colorName = $webSafeColors->getColorName('255,255,0');
//$hexValue = $webSafeColors->getHexValue('');
//$rgbValue = $webSafeColors->getRgbValue('yellow');
//$rgbCodeFromHex = $webSafeColors->getRgbValuefromHex('#ff0053')

//$trueOfFalse = $webSafeColors->isWebSafeColor('255,255,0');
echo $webSafeColors->getClosestMatchingWebsafeColor('bluessblack');
?>