Copyright © 2009, Sean Werkema. All rights reserved.
Overview & Usage | Options | Public API | Examples | License | Download | Source Code | Changelog
This first example demonstrates including the ProColor color-picker as a static page element. Notice that the color-picker window is tied to the input textbox, and that the events generated by the color-picker are captured and displayed below the color-picker. Notice also that we use unusual color-formatting here, which ProColor allows.
In this example, we use the dropdown-button functionality provided by ProColor. Clicking the dropdown button generates a color-picker popup window, and clicking outside that window (or clicking the color-picker's X button) closes it. Again, the color-picker is fully synchronized to the input field at all times, and the button object works in lieu of the color-picker window, when necessary, to ensure that the input field has a valid input value (and background/text color) at all times.
This very lightweight example shows how you can easily add ProColor to existing pages with minimal changes. The input field below simply has "procolor" as part of its classname, and ProColor can automatically pick up on that and generate a suitable popup button. Notice also how ProColor's color-picker is smart enough to stay on-screen despite being positioned at the bottom-right corner of the document.