mapbox / mapbox/mapbox-gl-js

Custom layer incorrectly renders the alpha color channel if the color has a white tint.

Open
#7,434 2 comments 0 reactions 1 assignee View on GitHub

@ansis is already working on this.

Since Oct 17, 2018.

docs :scroll: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

if the color has a white tint, alpha color channel gets Incorrectly rendered
Lib version is **mapbox-gl-js: 0.50.0**

**Example:**
https://jsfiddle.net/boyur/2f5tmj7x/70/

_For example orange color with white tint gets rendered as:_
`gl_FragColor = vec4(1.0, 0.7, 0.5, 0.1);`

![screenshot 2018-10-17 at 18 53 13](https://user-images.githubusercontent.com/11750653/47099441-f92b4280-d23d-11e8-9ffa-7b8a07dbd300.png)

_Red color is rendered correctly:_
`gl_FragColor = vec4(1.0, 0.0, 0.0, 0.1);`

![screenshot 2018-10-17 at 18 53 02](https://user-images.githubusercontent.com/11750653/47099449-fe888d00-d23d-11e8-953e-52de69347da4.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.