Jump to content

Choose Color From List And Set To Text Color

Recommended Posts

Site URL: https://www.yoloyoli.art/

I have four main colors that I use on my website. I would like to make the color of certain text change every time the page is visited to one of the four colors. I would assume to use an array and have it pick a random from that list and set it to the text color. However, I need help on going about this. Every attempt I made to create an array came with a syntax error. Got any ideas? Thanks!

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 9/12/2022 at 12:46 AM, yoloyoli123 said:

Site URL: https://www.yoloyoli.art/

I have four main colors that I use on my website. I would like to make the color of certain text change every time the page is visited to one of the four colors. I would assume to use an array and have it pick a random from that list and set it to the text color. However, I need help on going about this. Every attempt I made to create an array came with a syntax error. Got any ideas? Thanks!

I imagine that when client visit you site, it always pop-up a modal to pick the color.

After picking color, the page will be set the appropriate style.

Is it your requirement?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.