How do I Create a Color Picker Swatch?
This lesson will show you how to make a color picker swatch.
Make Graphic Opaque
Edit the Script
Open the script editor for the graphic and enter the script shown below.
The script uses the answer color dialog to display the system color picker (1). The backgroundcolor of the graphic is passed in as the default color to display in the color picker (2). The color the user selects is then assigned to the background color of the graphic (3).
Copy & Paste
on mouseUp pBtnNum
if pBtnNum is 1 then
## Prompt user for color using current color as default
answer color with the effective backgroundcolor of me
## If user didn't cancel then assign background color
## to chosen color
if the result is not "cancel" then
put it into theChosenColor
set the backgroundcolor of me to theChosenColor