A function for "clears all currently loaded color swatches”

I would like to create a jsx script that →→ clears all currently loaded color swatches.

Since I am a noob who doesn’t know how to program,
Can any god help me to solve this problem?