stac-extensions / classification

Describes categorical values and bitfields to give values in a file a certain meaning (classification).
Apache License 2.0
11 stars 3 forks source link

Supporting hints for alpha channel transparency? #52

Open tylere opened 5 months ago

tylere commented 5 months ago

There currently exists a color_hint property that hints at how the class should be visualized, and is required to be a 6 character hex code ("pattern": "^([0-9A-Fa-f]{6})$") for an RGB color. This does not allow for hinting on visualization alpha channel transparency for the color.

Ideas for including support for alpha channel hints:

  1. Expand the schema for the color_hint property to allow for optionally specifying an alpha channel as a RGBA code. ("pattern": "^([0-9A-Fa-f]{6})$|^([0-9A-Fa-f]{8})$"). This is my current preferred option.

  2. Add an optional sibling property alpha_hint that specifies the alpha channel ("pattern": "^([0-9A-Fa-f]{2})$")

m-mohr commented 4 months ago

I think I also prefer option 1. Happy to review PRs.