# Changing Button Colours

**URL:** <https://discourse.psychopy.org/t/changing-button-colours/25739>\
**Category:** Online experiments\
**Tags:** buttons, pavlovia\
**Created:** [November 1, 2021, 11:08am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739 "2021-11-01T11:08:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![seline](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@seline](https://discourse.psychopy.org/u/seline)\
**Post date:** [November 1, 2021, 11:08am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/1 "2021-11-01T11:08:40Z")

</div>

URL of experiment: [Pavlovia](https://pavlovia.org/scu24/dev_batch)

Description of the problem:  
I am trying to format a series of buttons on a PsychoPy task so that they are properly presented on the Pavlovia online version of the same task. There doesn’t seem to be a 1-1 match in the formatting, as seen in the pictures below (see task for PsychoPy buttons)-

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/a/8a23cfc35cd70af077e1c8c4b1c70340c6108dc1.png)

I have been able to get the right button sizes approximately by trial and error but I am unsure on how (if its even possible) to adjust the colour of the buttons?

The normalised and Python RGB haven’t seem to make a difference to the online experiment?

Thanks  
Seline

---

<div class="post-metadata">

**Author:** ![Sharon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sharon/32/14729_2.png) [@Sharon](https://discourse.psychopy.org/u/Sharon)\
**Post date:** [November 2, 2021, 12:41am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/2 "2021-11-02T00:41:01Z")

</div>

I’m on the same boat! Seeing the same issues - color and size has no impact on Pavlovia. In psychopy it works well, when I upload to pavlovia it makes not difference what size or color I choose.

---

<div class="post-metadata">

**Author:** ![seline](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@seline](https://discourse.psychopy.org/u/seline)\
**Post date:** [November 2, 2021, 11:51am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/3 "2021-11-02T11:51:58Z")

</div>

I’ve also found that the results report at the end (with the Excel spreadsheets) doesn’t record which button was pressed, are you also having this issue?

---

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/guy/32/31515_2.png) [@Guy](https://discourse.psychopy.org/u/Guy)\
**Post date:** [November 2, 2021, 12:45pm UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/4 "2021-11-02T12:45:29Z")

</div>

Hi Seline,  
(I’m working with Sharon on the same experiment).

We’re not there yet (capturing results). We’re trying the make it working on-line first and it seems that there is a rough road ahead!

Not sure what to do… It is a huge roadblock!

@wakecarter - Please help us out here. Can you direct us to someone who may advise?

Thank you,  
Guy

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 2, 2021, 1:27pm UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/5 "2021-11-02T13:27:00Z")

</div>

Since buttons either don’t work online or have only recently started to do so, I haven’t yet started making use of them. I still put rectangular polygons behind text components.

---

<div class="post-metadata">

**Author:** ![seline](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@seline](https://discourse.psychopy.org/u/seline)\
**Post date:** [November 2, 2021, 3:22pm UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/6 "2021-11-02T15:22:38Z")

</div>

Hi all,

Thanks for your replies. I am getting the impression that for now polygons and text are the way to go…

@wakecarter is there a good first resource you’d recommend for putting these together?

Best,

Seline

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [November 2, 2021, 7:47pm UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/7 "2021-11-02T19:47:07Z")

</div>

Hi There,

This is a bug that the development team are aware of. I would recommend using clickable images or text for now since button components are still beta (the sticker is going back on that!).

Thanks,  
Becca

---

<div class="post-metadata">

**Author:** ![seline](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@seline](https://discourse.psychopy.org/u/seline)\
**Post date:** [November 2, 2021, 9:54pm UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/8 "2021-11-02T21:54:37Z")

</div>

Hi Becca,

Thanks for your information. I have been able to use polygons and text now instead. Buttons would have been perfect if not for the issues above. Hopefully it can be fixed soon.

Best wishes,

Seline

---

<div class="post-metadata">

**Author:** ![Sharon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sharon/32/14729_2.png) [@Sharon](https://discourse.psychopy.org/u/Sharon)\
**Post date:** [November 3, 2021, 12:08am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/9 "2021-11-03T00:08:15Z")

</div>

Hi @Becca,

Unfortunately button is not defined as beta. Had I know I would not have used that.

Where can I find info about polygons and text?  
How can I utilize that as button? How can I get the input of which polygon did the user pick?

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/8/c8f0dd05254772a7d7f3bc996a92c06f52d832b7.png)

Thank you,  
Sharon

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [November 3, 2021, 9:39am UTC](https://discourse.psychopy.org/t/changing-button-colours/25739/10 "2021-11-03T09:39:34Z")

</div>

Hi Sharon,

Yes, the beta sticker is due to be put back on this component. Since it is still beta for online use, hopefulyl this will be clearer in the next release.

You can turn any visual thing (polygon, image, text) into a button in PsychoPy by adding a mouse component, setting “Force end routine on” to “valid click” and then listing the name of clickable components in the clickable field of the mouse component.

Thanks,  
Becca
