By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,820 Members | 1,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,820 IT Pros & Developers. It's quick & easy.

How to do a color picker

P: n/a
Hi,

I wanted to know if it is possible to do a "color picker" with PHP ?

thanks
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Tue, 06 Apr 2004 16:12:49 +0200, lasterix <pm@dersy.com> wrote:
Hi,

I wanted to know if it is possible to do a "color picker" with PHP ?


Two ideas:

1. If you display an image of your colour space in a form with an
image <input>, the pixel co-ordinates that the user clicked will be
passed to your PHP form handler. You can then work out which colour
the user clicked on from those.

2. If the user has to choose from quite a small set of colours, you
can use PHP to generate a small image for each colour. Make each image
a link, or put a radio button beside it. Although PHP isn't required
for this, it may make it easier to add more colours in future.

If you want an interactive thing with sliders and the like, you'll
have to use something like Flash.

--
David ( @priz.co.uk )
Jul 17 '05 #2

P: n/a
"lasterix" <pm@dersy.com> wrote in message
news:40***********************@news.free.fr...
Hi,

I wanted to know if it is possible to do a "color picker" with PHP ?


Possible, but it's probably easier to do it on the client side. There're
tons of code out there for that. Here's one example:
http://www.softcomplex.com/products/...ker/demo1.html
Jul 17 '05 #3

P: n/a
lasterix wrote:
Hi,

I wanted to know if it is possible to do a "color picker" with PHP ?

thanks


for info someone gave me that link :

http://www.blueshoes.org/en/javascript/colorpicker/

it's great !!!!
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.