How to generate random color for a shape?

Hello. I am creating a forum where people can tag their posts. The tags ( one word text) are shown in a shape with a blue color.

How do I generate a new background color for my shapes when a new tag (new word) is generated? So that the same tags have the same background color and different tags have different background colors?

Are the tags being saved to the post in the database? If so then maybe create a data type called “Tag” and give it atleast two properties (“name” and “color”). Then on your post data type you can add a field to save the list of tags. When a new tag is going to be added to a post, first you would do a search in the database to see if there is a tag where the name is equal to the input the user entered. If that search: first item is not empty then you will just make changes to parent group post and add that found tag to the post’s list of tags. If the search for tags: first item is empty then you would create a new tag and choose a random color at this point. Then make changes to parent group post and add the newly created tag to the parent group post’s list of tags. This will ensure that if the tag already exists it will use the same color and if it does not then you can choose a new color. You should save the color in the database as a string like so “#FFFFFF”. When a new color needs to be chosen you can just use the built in “Calculate Formula” in the workflow action so get a randomo 6 character string of numbers and letters to create random colors.
Screenshot 2023-04-03 at 11.01.17 AM
Screenshot 2023-04-03 at 11.03.55 AM

This would generate a string with characters above F though, right? So not a valid color.