This script uses nested "for loops" to create a grid of swatches and assigns each a backgound color based on hue saturation and lightness values. In this example, saturation is at 100% for all swatches, hue values are rotated 20 degress for each row and lightness is stepped through 5% increments from 10% to 90%. A row is then added with greyscale values. The palette is movable and may be opened and closed. Pick a color and click on things.
Rrgb(255, 255, 255)