The Color Picker below looks much like the pickers in other examples. However, two changes have been made:
Element ID strings for the Color Picker Control are stored in the
YAHOO.widget.ColorPicker.prototype.ID object. We've dumped the full output of that object to the logger to give you a sense of the object's full contents.
For the purposes of this example, we'll override the
B members of that object. We'll create a new object with those members and then use
YAHOO.lang.merge to integrate our new values with the existing object; this will override only the members we specify in the second argument of the
We can use the same technique to override members of
YAHOO.widget.ColorPicker.prototype.TXT for the purposes of customization or internationalization. Again, you can find the full contents of that object dumped to the logger console.
Here, we'll modify the
B members and change those text strings to "Red", "Green", and "Blue":