mapbox / mapbox/mapbox-gl-js

Inherit text-halo color from underlying fill layers

Open
#4,969 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Text halos are useful for improving legibility by applying an area of solid color around the text. However, they can be distracting when you can't be certain of what's in the background, and when there is a mismatch between background and halo colors.

![screen shot 2017-07-10 at 5 30 57 pm](https://user-images.githubusercontent.com/4551508/28046087-f71ccfa6-6595-11e7-8a19-34917a8dd522.png)

_Ideally, the left label would have a blue halo to match the water. Labels over the park (right) would have a green halo to match that park.The center label with land-colored halo is ideal_.

How feasible is it, to add an option to inherit `text-halo-color` from the `fill` and `background` layers immediately below it, for each pixel of the halo?

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.

Research direction

No implementation files, tests, or entry points are named. Start by locating the text-halo rendering path and how fill and background layers are represented, then determine whether per-pixel inheritance is feasible. Done would mean halos match the underlying layer colors, including the label examples described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.