Like briefly discussed in #99, I suggest adding scheme = "auto" to the upcoming auto-generated themes. This would then choose either light or dark, depending on the relative luminance of the wallpaper.
In short, to get the appropriate relative luminance for a wallpaper, the following steps have to be taken:
- Get the average color of the image
- Calculate the relative luminance using the following formula:
Y = 0.2126 * R + 0.7152 * G + 0.0722 * B (see link above)
- Decide on the
scheme based on the resulting relative luminance Y (<= 0.5 could be dark, else light)
The threshold could be an optional field for the user. The suggested auto option should be explained in the docs/wiki.
Like briefly discussed in #99, I suggest adding
scheme = "auto"to the upcoming auto-generated themes. This would then choose eitherlightordark, depending on the relative luminance of the wallpaper.In short, to get the appropriate relative luminance for a wallpaper, the following steps have to be taken:
Y = 0.2126 * R + 0.7152 * G + 0.0722 * B(see link above)schemebased on the resulting relative luminanceY(<= 0.5 could bedark, elselight)The threshold could be an optional field for the user. The suggested
autooption should be explained in the docs/wiki.