Creating a Color Picker Swatch
Learn how to make a color picker swatch.
Create a Graphic
Select the Graphic tool (1) and draw a square graphic on a stack.
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).
The Script in Action
Clicking on the graphic will now display the color picker.
Choose a new color and click OK.
The graphic is now assigned the new color.
Comments (1)
Arthur Pinkerton June 08, 2008 12:52
Awesome, tanks Trevor. I always wondered how you guys were having a select color picker in the app.
Thanks again. I am going to live in these tutorials for awhile as a newbie to rev.
Add your comment