Random array without duplicates over 2 fields

I have a list of colors : [‘black’,‘white’,‘red’,‘blue’,‘green’,‘yellow’,‘orange’,‘purple’]
I have two fields that have random sample of that list
"likes " & “dislikes”
I can use a JsonArray and use the following code:
[‘black’,‘white’,‘red’,‘blue’,‘green’,‘yellow’,‘orange’,‘purple’].sample(3).join(’,’)
and this will give me a random sample, but…

How can I make sure that the sample in “dislikes” excludes the colors already chosen in “likes”?

SO I found a solution myself: I’ll just put it here in case it helps someone:

I out this in the code for the dislikes

colors=[‘black’,‘white’,‘red’,‘blue’,‘green’,‘yellow’,‘orange’,‘purple’]
likes = field(“Likes”).split(",")
colors -= likes
colors.sample(3).join(’,’)