PHP Classes
elePHPant
Icontem

True Color Picker: Present a palette to let the user pick colors

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-10-10 (9 years ago) RSS 2.0 feedStarStarStarStar 68%Total: 3,376 All time: 991 This week: 1,109Down
Version License PHP version Categories
truecolorpicker 1.0Freely Distributable4Graphics, Content management, AJAX
Description Author

This class can be used to present a palette to let the user pick colors.

It displays an image with all the tones for the user to pick by clicking in an image point with the desired tone similar to Photoshop.

It uses AJAX to update the picker boxes without reloading the page.

Innovation Award
PHP Programming Innovation award nominee
July 2007
Number 6


Prize: One book of choice by Packt
Some Web applications need to provide a Web interface to let the users choose colors to render different aspects of the sites.

Desktop applications, like for instance Photoshop, use color picker dialog windows that provide an user-friendly way to choose colors from a true color palette.

This package can emulate that kind of color picker dialog windows for PHP based Web applications.

Manuel Lemos
Picture of Moe Sweet
Name: Moe Sweet <contact>
Classes: 2 packages by
Country: Myanmar Myanmar
Innovation award
Innovation award
Nominee: 1x

Details
class.TrueColorPicker.php
class.ColorElement.php

Developed by: Moe Sweet <moesweet@myanmar.com.mm>
From: Myanmar (Burma)
Date: 28-June-07

Thanks to: Sithu Kyaw, Pyone Kay Khine.

Most color pickers used on the web today only support web colors. For some applications like a garment or a paint shop, each color code should reflect the color from the real world.
TCP (True Color Picker) uses GD library to provide color picking facility as many colors as in "Photoshop" color picker.

There is only one factor you have adjust, the "detail factor". It determines how many number of steps/blocks between each corner of the 256*256 picker box. Thus maximum is 256.
When it is set to 256, the total number of colors available is 256*256*256. Minimum setting should not less than 16. Optimum is 64.

You pick a color code using GD, you re-display it using GD. The "ColorElement" class can display any valid color codes (#000000 to #ffffff) in a variable size rectangle box.

Drawbacks
----------------

You can preload a color to TCP to show in "current" box, like Photoshop. But TCP cannot locate that color in the picker. TCP does not support CMYK color. 
They may come up in version 2.

ColorElement class does not support textures.

Tested on: Firefox 2 and IE 6.

Mail me for any questions, comments and suggestions for improvement.

Happy Picking!

Screenshots  
  • screenshot2.png
  • screenshot.png
  Files folder image Files  
File Role Description
Files folder imageTrueColorPicker (10 files)
Plain text file example.php Example Usage example
Plain text file readme.txt Doc. Read me file

  Files folder image Files  /  TrueColorPicker  
File Role Description
  Plain text file index.php Example The one that shows the Color Picker
  Plain text file class.TrueColorPicker.php Class True Color Picker Class
  Plain text file class.ColorElement.php Class Color Element Class
  Plain text file colorPicker.js Data Javascript file that triggers Ajax functions
  Plain text file buildBrightnessBox.php Aux. A file called by Ajax, no need to modify
  Plain text file buildBrightnessTable.php Aux. A file called by Ajax, no need to modify
  Plain text file drawColorElement.php Aux. This file actually draw the color elements
  Plain text file generateBrightnessArrays.php Aux. Algorithm for calculating color codes for brightness box
  Image file hueBox.png Data The Thin Vertical Bar, I call it Hue Box, the big one, Brightness Box
  Plain text file hueColors.txt Data List of color codes of hue box

 Version Control Unique User Downloads Download Rankings  
 0%
Total:3,376
This week:0
All time:991
This week:1,109Down
User Ratings User Comments (2)
 All time
Utility:91%StarStarStarStarStar
Consistency:89%StarStarStarStarStar
Documentation:62%StarStarStarStar
Examples:72%StarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:468
 
I think the potential is great.
9 years ago (herve_tribouilloy)
70%StarStarStarStar
This is simply the best Color picker app I've tested so far !
9 years ago (David Coll)
70%StarStarStarStar