Skip to content

auto mode for the upcoming scheme option #104

@heidrifx

Description

@heidrifx

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:

  1. Get the average color of the image
  2. Calculate the relative luminance using the following formula: Y = 0.2126 * R + 0.7152 * G + 0.0722 * B (see link above)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions