Skip to content

feat(layers): honor normalizedColors for bitmap and text uniforms - #11156

Merged
ibgreen merged 3 commits into
masterfrom
codex/normalized-bitmap-text-colors
Nov 17, 2026
Merged

ibgreen merged 3 commits into
masterfrom
codex/normalized-bitmap-text-colors

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

For #11146

Background

Bitmap tint, bitmap transparency, and text outlines use byte channels even when Deck opts into normalized colors. Honor the Deck setting for plain arrays supplied to these top-level layer props.

Change List

  • Decode bitmap colors with typed-aware luma helpers
  • Forward the TextLayer outline convention to its glyph sublayer
  • Preserve built-in defaults and typed byte colors
  • Unit tests cover alpha, defaults, and runtime convention changes
  • Documentation lists the supported color props

Verified with yarn lint and 16 focused Chromium tests.


Note

Low Risk
Extends an opt-in configuration setting to additional layer uniform properties while preserving defaults and legacy typed array behavior.

Overview
Extends Deck's opt-in normalizedColors setting to top-level BitmapLayer (tintColor and transparentColor) and TextLayer (outlineColor). Plain JavaScript arrays provided to these props are now interpreted as 0–1 float channels instead of legacy 0–255 byte channels, while built-in defaults and typed byte arrays preserve their byte encoding.

Adds layer lifecycle hooks in Layer to convert uniform values before transitions start and recognize active transition values. This ensures color transitions interpolate in normalized shader space without being re-normalized mid-transition.

Reviewed by Cursor Bugbot for commit b44f3ad. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds support for normalizedColors to bitmap tint, bitmap transparency, and text outlines.

  • Bitmap colors use normalized channels when Deck opts in.
  • Text outlines use normalized channels when Deck opts in.

The earlier bitmap-fade finding is addressed: defaults and typed colors are decoded before interpolation. No new actionable issues were established. Tests were not run during this review.

Reviews (4) · Last reviewed commit: "Merge highlight color support from maste..." · Reviewed by Greptile

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8e7856a. Configure here.

@ibgreen ibgreen mentioned this pull request Nov 17, 2026
22 of 52 tasks
@coveralls

coveralls commented Nov 17, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.611% (+0.02%) from 83.589% — codex/normalized-bitmap-text-colors into master

@ibgreen
ibgreen merged commit b5c8425 into master Nov 17, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/normalized-bitmap-text-colors branch November 17, 2026 18:33

@chrisgervang chrisgervang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed b44f3ad after merge; follow-ups below. Two P1s: the tintColor, transparentColor and outlineColor entries still say 0–255 next to the new 0–1 paragraphs. Both are still on master. Uniform decoding and its transition path are sound.

Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.


Generated by Claude Code

Comment on lines 240 to +242
The color to tint the bitmap by, in `[r, g, b]`. Each component is in the `[0, 255]` range.

With Deck's [`normalizedColors`](../core/deck.md#normalizedcolors), plain arrays for `transparentColor` and `tintColor` on a top-level layer use 0–1 channels. Built-in defaults and byte typed arrays retain their byte encoding.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: tintColor says "Each component is in the [0, 255] range" right above a paragraph that says 0–1. transparentColor (line 237) says the same.

Could each entry carry the ScatterplotLayer sentence instead of the shared paragraph?

Suggested change
The color to tint the bitmap by, in `[r, g, b]`. Each component is in the `[0, 255]` range.
With Deck's [`normalizedColors`](../core/deck.md#normalizedcolors), plain arrays for `transparentColor` and `tintColor` on a top-level layer use 0–1 channels. Built-in defaults and byte typed arrays retain their byte encoding.
The color to tint the bitmap by, in `[r, g, b]`. Channels use the 0–255 range by default. See [Deck’s `normalizedColors`](../core/deck.md#normalizedcolors) to use 0–1 plain arrays.

Generated by Claude Code

Comment on lines 356 to +359
Color of outline around the text, in `[r, g, b, [a]]`. Each channel is a number between 0-255 and `a` is 255 if not supplied.


With Deck's [`normalizedColors`](../core/deck.md#normalizedcolors), plain arrays for `outlineColor` on a top-level layer use 0–1 channels. Built-in defaults and byte typed arrays retain their byte encoding.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The outlineColor entry says "Each channel is a number between 0-255", and the paragraph after it says 0–1.

Could the entry use the ScatterplotLayer sentence instead?

Suggested change
Color of outline around the text, in `[r, g, b, [a]]`. Each channel is a number between 0-255 and `a` is 255 if not supplied.
With Deck's [`normalizedColors`](../core/deck.md#normalizedcolors), plain arrays for `outlineColor` on a top-level layer use 0–1 channels. Built-in defaults and byte typed arrays retain their byte encoding.
Color of outline around the text, in `[r, g, b, [a]]`. Channels use the 0–255 range by default. See [Deck’s `normalizedColors`](../core/deck.md#normalizedcolors) to use 0–1 plain arrays. Omitted alpha is opaque.

Generated by Claude Code

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants