Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading non-hex Colors #316

Open
jansule opened this issue Jan 19, 2024 · 0 comments
Open

Reading non-hex Colors #316

jansule opened this issue Jan 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jansule
Copy link
Contributor

jansule commented Jan 19, 2024

Bug

Describe the bug

If a color value is not an expression, we currently simply pass the color value of a mapbox-style as-is to the geostyler-style. However, these values might come in the format of rgba(r, g, b, a), whereas geostyler-style expects hex-values. So we have to check for those values and replace them with their hex-color value in order for geostyler to work as expected.

Expected behavior

Color values that are not hex-colors should be replaced with hex-colors when reading a mapbox style.

Example mapbox-style with rgba color values.

 {
      "id": "boundaries",
      "type": "fill",
      "source": "terrestris_boundaries",
      "source-layer": "vector_osm_world_boundaries",
      "layout": {"visibility": "visible"},
      "paint": {
        "fill-color": "rgba(255, 255, 255, 0.82)",
        "fill-outline-color": "rgba(0, 0, 0, 1)",
        "fill-opacity": 1
      }
    },
@jansule jansule added the bug Something isn't working label Jan 19, 2024
@KaiVolland KaiVolland moved this to Todo in CodeSprint 2024 May 28, 2024
@jansule jansule moved this from Todo to Done in CodeSprint 2024 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants