# Style the Portal button?

**URL:** <https://forum.ghost.org/t/style-the-portal-button/27943>\
**Category:** Memberships & subscriptions\
**Created:** [January 16, 2022, 7:44pm UTC](https://forum.ghost.org/t/style-the-portal-button/27943 "2022-01-16T19:44:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristofor](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kristofor/32/4428_2.png) [@kristofor](https://forum.ghost.org/u/kristofor)\
**Post date:** [January 16, 2022, 7:44pm UTC](https://forum.ghost.org/t/style-the-portal-button/27943/1 "2022-01-16T19:44:53Z")

</div>

Hi,

Does anyone know of a way to style the portal button? Or to change the accent colours on the portal UI? It seems that this is tied to the theme accent and can’t be customised individually?

I’m using the Casper theme, and when I select an accent colour suitable for the dark theme, it’s not changing the text colour of the portal button to suit a dark theme. So the button text is always white and is therefore unreadable.

![Screen Shot 2022-01-17 at 6.39.58 am](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/0/e/0e608951e84d8fc183da01facb8e0f0ebd8e4e5f.png)

Is there a way to update the text colour on the portal button? It seems that in the past there was a style option for the Portal specifically, but I can’t see this in the admin or the Portal settings.

Thanks,  
Kris

---

<div class="post-metadata">

**Author:** ![Fute](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/fute/32/25582_2.png) [@Fute](https://forum.ghost.org/u/Fute)\
**Post date:** [September 20, 2023, 11:05pm UTC](https://forum.ghost.org/t/style-the-portal-button/27943/2 "2023-09-20T23:05:05Z")

</div>

It’s sad no one even bothered to answer you. I am in the same situation but my button is really unreadable due to my light accent color.

---

<div class="post-metadata">

**Author:** ![reyemtm](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/reyemtm/32/28575_2.png) [@reyemtm](https://forum.ghost.org/u/reyemtm)\
**Post date:** [January 26, 2024, 1:10am UTC](https://forum.ghost.org/t/style-the-portal-button/27943/3 "2024-01-26T01:10:52Z")

</div>

In the code injection -

```auto
  window.onload = () => {
    var iframe = document.querySelector('#ghost-portal-root').children[0];
    var iframeWindow = iframe.contentWindow;
    iframeWindow.document.querySelector('.gh-portal-triggerbtn-label').style.color = 'black;
  }

```

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 26, 2024, 2:54am UTC](https://forum.ghost.org/t/style-the-portal-button/27943/4 "2024-01-26T02:54:58Z")

</div>

> [@reyemtm](#):
>
> ```auto
> window.onload = () => {
> var iframe = document.querySelector('#ghost-portal-root').children[0];
> var iframeWindow = iframe.contentWindow;
> iframeWindow.document.querySelector('.gh-portal-triggerbtn-label').style.color = 'black;
> }
> 
> ```

This code doesn’t work. It’s missing a `'` after the black, but it still doesn’t work, at least in this case with the iframe loaded cross-origin (which is a problem for [ghost.io](http://ghost.io) users).

I suspect @Fute no longer needs an answer. (Sorry, Fute, I didn’t see your post the first time for whatever reason.) But in the event that he does, a better option might be to turn off the Portal button (it’s in settings \> portal \> look and feel), and to instead inject a button into the page itself (not as an iframe), which then triggers the portal display.

---

<div class="post-metadata">

**Author:** ![reyemtm](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/reyemtm/32/28575_2.png) [@reyemtm](https://forum.ghost.org/u/reyemtm)\
**Post date:** [January 26, 2024, 1:22pm UTC](https://forum.ghost.org/t/style-the-portal-button/27943/5 "2024-01-26T13:22:03Z")

</div>

Right this only works for self hosted instances.
