Updating colors of Calls to Action on SharePoint Online Banner Webpart

This is a Call to Action button on a banner web part and its default color is black.
Here we’re going to take a look at how you can update it to another color as shown below.

  1. Go to the page for which you’d like to overwrite a CTA.
    NOTE: If you have several pages, this means you need to repeat these steps for each page

  2. Edit the page

  3. At the top of the page, insert a new app called “Embed Script or Code”

  4. Click the [Edit script] button

  5. Add the following code in the [Embed] window

  div[class^="overlayTextWrapper-"], div[class*=" overlayTextWrapper-"]
    background-color: #EBB23B !important;
  1. Change the highlighted color Hex to any hex you like

  2. Click [Save] in the [Embed] popup and publish the page.

  3. Repeat steps 1-7 for other pages where you might want to update the color of the CTA