PHP Classes

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

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 3,413 All time: 1,003 This week: 62Up
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
Age: 40
All time rank: 8291 in Myanmar Myanmar
Week rank: 164 Up2 in Myanmar Myanmar Down
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 (2)  
  • screenshot.png
  • screenshot2.png
  Files folder image Files (14)  
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 (14)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:3,413
This week:0
All time:1,003
This week:62Up
User Ratings User Comments (2)
 All time
Utility:89%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:60%StarStarStarStar
Examples:73%StarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:482
 
I think the potential is great.
16 years ago (herve_tribouilloy)
70%StarStarStarStar
This is simply the best Color picker app I've tested so far !
16 years ago (David Coll)
70%StarStarStarStar