# Color picker in Builder/Coder

**URL:** <https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317>\
**Category:** Builder\
**Created:** [July 2, 2019, 4:50am UTC](https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317 "2019-07-02T04:50:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharat.biswal](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bharat.biswal](https://discourse.psychopy.org/u/bharat.biswal)\
**Post date:** [July 2, 2019, 4:50am UTC](https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317/1 "2019-07-02T04:50:07Z")

</div>

If this template helps then use it. If not then just delete and start from scratch.

**OS** (e.g. Win10):  
**PsychoPy version** (e.g. 1.84.x): 3.0.1  
**Standard Standalone? (y/n)** If not then what?:y  
**What are you trying to achieve?:**  
Create a Color Picker for user to choose a color

**What did you try to make it work?:**  
Not sure how to go about it.

**What specifically went wrong when you tried that?:**  
Include pasted full error message if possible. “That didn’t work” is not enough information.  
I am not getting any idea how to implement a Color Picker. Please help.

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [July 2, 2019, 9:23am UTC](https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317/2 "2019-07-02T09:23:24Z")

</div>

Hi @bharat.biswal, can you provide some more information about how you want to implement a color picker?

---

<div class="post-metadata">

**Author:** ![bharat.biswal](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bharat.biswal](https://discourse.psychopy.org/u/bharat.biswal)\
**Post date:** [July 4, 2019, 12:18pm UTC](https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317/3 "2019-07-04T12:18:36Z")

</div>

Hi @dvbridges  
I am new to PsychoPy. I want to create a Routine in Builder with following screen:

 ![50%20PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/8/c87539ca717c1bfa4f293cba9562655546f20cf0.png)

It has a Color Picker (square) with Alpha slider (vertical) at the right side.  
Is there a sample code I can use?  
Regards,  
Bharat

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [July 8, 2019, 5:29pm UTC](https://discourse.psychopy.org/t/color-picker-in-builder-coder/8317/4 "2019-07-08T17:29:02Z")

</div>

@bharat.biswal, how about the attached. It is a color palette similar to above, except that the user uses sliders to pick the hue, saturation and value, rather than selecting the image with the mouse. The polygon above the palette gives visual feedback regarding the selection.

[colPal.psyexp](https://discourse.psychopy.org/uploads/short-url/gtvcFg8eJxvwdsy4jG7bPXT4BHZ.psyexp) (23.2 KB)

If you have any questions about the code component, please let me know.
