Dao and Amy, I'd be grateful for some early feedback on this approach to a theme generator. This patch defines that we want to use nine colours in monochromatic themes and maps each theme property to one of those nine colours. Then, a module outputs a color-mix value using the level of contrast requested and the theme's base color. It's pretty rudimentary -- the module outputs a simple string, and doesn't yet account for the other kinds of themes UX wants from this project. Still, it automates creating theme manifests so we don't have to manually create near-copies of
browser/themes/addons/monochromatic-purple/manifest.json using different base colors. The set of 9 contrast ratios and how they map to theme properties is pretty much arbitrary. We'll need UX input on the logic to use there.
If you want to test the patch, toggle
browser.theme.temporary.monochromatic.enabled and restart Firefox to get the Monochromatic Purple theme to appear. You could see how it works with colors other than purple by changing the value of
frame in the theme manifest. I've attached a screenshot of how it looks for #D0FFED.
I'm OoO for the rest of the week, so no rush on offering feedback!