I've been mucking around with GD, since I haven't had much opportunity to play with it. We definitely need to get something into the book about it
For fun, I created a true color picker page. You can see it in action here.
Also please feel free to criticize my code. It's my first major GD app, so if there's something I did in there that could be done more efficiently, I'd like to know. Your feedback is very much appreciated.
The app has been tested in Mozilla 1.7 and IE 6. If it doesn't work in your browser, please let me know (although I don't know if I'll have a lot of time to devote to making it more browser-friendly). If you can't click the palette to load colors, you can always enter parameters in the URL.
It takes three different forms of input. First you'll always need scale. 0 for red, 1 for green, and 2 for blue: ?s=1
Next, either put in an rgb value: &rgb=33FF99 (example)
- or -
Enter x, y, and depth values: &x=148&y=197&d=168 (example)
- or -
Enter a valid color Name: &color=HotPink (example)
The RGB values are hex, and the x/y/depth values are decimal. The color name must be valid or the app will pick a random web safe color.
Have fun, and thanks for your feedback!