Create color themes that use OS native colors
Electron has several API functions for retrieving specific native colors from the operating system. The main function that does this is systemPreferences.getColor(color)
, but additional features are provided by systemPreferences.getAccentColor()
and systemPreferences.getSystemColor(color)
. I'm not familiar with any examples of applications that have actually used these functions, but they could be especially nice on macOS Big Sur, where the system colors can be "vibrant"; that is, system colors vary slightly based on wallpaper tinting. Supporting native system colors could help the Mattermost desktop app feel even more at home in various desktop environments.
You can find the functions in question here:
https://www.electronjs.org/docs/api/system-preferences
I recognize that native color theming would be a huge pain to test due to the wide variety of test targets, and I recognize that it would be a relatively low priority. Mainly I just think it's cool that Electron provides this functionality.