This is a feature request similar to safari where the most prominent colour on the website affects the browser address bar and tabs. The font colour can automatically change to be legible.
We could have this extended to the extension and settings menu as well for both desktop and mobile applications.
Further extension can be for dark mode, we could get a darker tone of that colour.
Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.