PHP Classes

File: test/test_MyColors.php

Recommend this page to a friend!
  Classes of Lokesh  >  myColors  >  test/test_MyColors.php  >  Download  
File: test/test_MyColors.php
Role: Example script
Content type: text/plain
Description: Class source
Class: myColors
Analyze and convert color values
Author: By
Last change:
Date: 9 years ago
Size: 2,178 bytes


Class file image Download

require_once '../core/myColors.class.php';

<!DOCTYPE html>

<html lang="en">
        <meta charset=utf-8 />
        <title>myColors - code your own formula</title>
        <link href="../doc/src/styles.css" type="text/css" rel="stylesheet" >
        <div id="title">
            <img src="../doc/src/myc.png"/><font size="0.5em">v1.0</font>
        <!-- content -->
        <div id="content">
            <div id="content">
                <h1>Live Demo</h1>
                <h3>input color value. example (#2f8cab, #45a, rgb(12,34,126), hsl(220,45,89), hsv(110,14,72), name(red))</h3>
                <div class="body">
                    <form method="get" action="test_MyColors.php">
                        <input type="text" name="color" />
                        <input type="submit" value=" enter " name="submit"/>
= 'red';
$degree = 15;
$total = 10;
$colors_info = FALSE;
$colorize = new myColors($_GET['color'], $colors_info);

$rr = $colorize -> discover($formula, $total, $degree);
"<div class=\"layout\"><pre>";
$info = $colorize -> displayInfo();
'<h2>#' . $info[0]['hex color'] . ' (' . $info[0]['info']['color name'] . ') ' . '</h2></br></br></br>';

                    foreach (
$rr as $r)
"<span style=\"padding:25px 45px;max-width:40px;background-color:#" . $r . "\"> <span style=\"color:#$r\">-</span> </span>";

                     * if $color_values set to TRUE use this loop instead of top loop
                     foreach ($rr as $r)
                     foreach ($r as $col)
                     echo "<span style=\"padding:25px 45px;max-width:40px;background-color:#" . $col.
                     "\"> <span //style=\"color:#$col\">-</span> </span>";


                    <div id="footer">
                        myColors Copyright 2012
                        Project vylson silwr

For more information send a message to info at phpclasses dot org.