Idea: dynamically determine if a light or dark font color should be used
Now that I'm enabling the modification of the themes colors, a usability issue can arise if there isn't enough contrast between the font color and the background color.
In theory, the font color could be set to dark or light depending on how close it's background color is to black/white.
If this works well, it might be worth using in upstream Eclipse.
Sounds like a very good idea. Maybe this approach could also calculate a fitting color based on what colors are already in the scheme. With this approach you could even randomly create new themes. :)
@ingomohr I was thinking the same just earlier today :) A rule of thumb I use when customizing the colors of Modern Dark is to set the base theme to a lighter color variation of the background theme.
All of the theme's colors could theoretically be dynamically calculated so that the user only has to set a background color & an accent color. Then these 2 colors could be randomly picked :D
I haven't determine yet how these color preference "extensions" should be made.
There is a ColorFactory extension point for org.eclipse.ui.themes which I haven't read the documentation for yet. Maybe it allows defining custom UI buttons for a given color/font preference in the Colors and Fonts preference page? Need to look into it.
Otherwise, I could make a preference page for the Modern Dark plugin.
Maybe a dedicated preference page for modern dark is a good idea after all. It could provide a convenient way to setup and store multiple modern dark theme schemes so that the user could easily switch back and forth. 😊
Agreed, I was thinking the same thing :) I think it'd provide the plugin with more flexibility overall.
I've been working on this a bit, I think the PR for it is almost ready. Unfortunately, it seems that some css-refactoring is required to make it so that text is always legible (regardless of the user's selected theme colors). However, for the active ctabfolder's, things seem to work:

You can now use a "light" color as an accent color, and the active tab's font will be dark colored.