feat: pick random colors for popovers from command palette
This pull request introduces three commits to improve the display of popovers in the HoverEditor.
It adds a new command "Pick random background colors for all popovers". The command assigns random background colors to all currently active popovers. This allows users to customize the appearance of popovers and easily distinguish between multiple popovers. Another command, "Pick random colors for recently opened popovers" iterates over active popovers and assigns random background colors to those popovers that have recently been opened and do not have a custom color already assigned.
Lastly, it enhances the method for generating background colors in the HoverEditor component. The code now calculates the luminance of the current text color and uses this information to generate a background color that provides sufficient contrast. This ensures that text is always easy to read, regardless of the background color.
Motivation:
I always wonder if the bouncing command was an easter egg, an intended screensaver or just a demo. I had used it when handling notes very late at night and felt that it really helped me think more visually, easily navigating these notes on a large screen. However, the background colors often turned the text unreadable due to the contrast ratio, and the constant position changes became more cumbersome as the number of files increased. So, I made these changes.
I don't know if it's a very specific use case, but since these features don't change the overall UX of the plugin, I think that maybe it's worth a pull request.