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

Linear function for label opacity causes rgba stroke values to display incorrectly #346

Closed
nickidlugash opened this issue Mar 20, 2014 · 5 comments
Labels
Milestone

Comments

@nickidlugash
Copy link

The road labels with gray strokes below use a linear function for opacity

"opacity": ["linear", 15, 0, 1, 0, 1]

and a semi-opaque white rgba value for the stroke

"stroke": [1.0,1.0,1.0,0.7],

This is what it looks like at z17:
screen shot 2014-03-20 at 6 50 47 pm

Is there anything we can do about this?

@mourner mourner added the bug label Jun 24, 2014
@mourner mourner added this to the v1.0.0 milestone Jun 24, 2014
@mourner
Copy link
Member

mourner commented Jun 24, 2014

Can you clarify the expected result?

@nickidlugash
Copy link
Author

@mourner I would expect the halos to remain white (i.e. the RGB values remaining the same, the A value interpolating from 0 to 0.7). It looks like instead all the RGBA values are interpolated?

@kkaefer
Copy link
Contributor

kkaefer commented Jun 24, 2014

This looks like a double-premultiply issue.

@jfirebaugh
Copy link
Contributor

I haven't reproduced this yet, checking to make sure I have the right v3 translation:

      "text-halo-color": "rgba(255,255,255,0.7)",
      "text-opacity": {
        "fn": "linear",
        "z": 15,
        "val": 0,
        "slope": 1,
        "min": 0,
        "max": 1
      }

@jfirebaugh
Copy link
Contributor

@nickidlugash Are you able to reproduce this with a v3 stylesheet?

@ansis ansis closed this as completed in ac0e3cb Jun 26, 2014
lucaswoj pushed a commit that referenced this issue Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants