caewok / fvtt-elevated-vision

Adjust Foundry VTT vision, lighting, and token elevations based on terrain, wall, or token elevation.
MIT License
12 stars 5 forks source link

Feature Request: Multicolor height indicators #56

Closed Jakimcio closed 9 months ago

Jakimcio commented 1 year ago

It would be nice if we could have or set different colors for different heights, so I could see with one quick glance if everything has the correct height.

caewok commented 1 year ago

In v0.5.2, I added the option in settings to define a minimum and maximum elevation color. Elevation ranges between will be interpolated between the two colors. The current elevation maximum for the scene is used, so if you have, say, 5, 10, 15, 20, the colors should be distinguishable. As should 5, 500, 1000, although you probably would have trouble distinguishing, e.g., 1020 from 1000 at that point.

I am going to leave this comment open for awhile, in case you or others have additional ideas. The balance here is tricky, and I am far from a color expert, so others might have a better approach. Some things I am considering for this balance:

  1. Elevation can theoretically have 65,536 distinct values. But in practice, I am really mostly concerned with distinguishing between reasonably equidistant elevations for a reasonable subset, such as the 5, 10, 15, 20 example above.
  2. Mostly because of (1) but also because of wanting to not make the settings too fiddly, I think defining a bunch specific colors for different elevation values is not an option. The solution needs to work with a defined range (think percentage between 0 and 1).
  3. I considered but (at least for the moment) rejected the idea of setting colors per-scene. It is too fiddly to have the user do it for every scene. If I knew more color theory, perhaps I could automatically identify complementary colors based on the dominant colors in a scene image. But the UI here would be a bit confusing, because elevation colors would no longer be consistent across scenes.
  4. Users need to be able to override colors to address color blindness issues.

Thanks for the suggestion, and hopefully v0.5.2 goes some way towards addressing it!