Skip to content

Backport #1603 fix: background color of figure was not computed properly (#1603)#1606

Merged
martinRenou merged 1 commit intobqplot:masterfrom
martinRenou:backport_1603
Jul 11, 2023
Merged

Backport #1603 fix: background color of figure was not computed properly (#1603)#1606
martinRenou merged 1 commit intobqplot:masterfrom
martinRenou:backport_1603

Conversation

@martinRenou
Copy link
Copy Markdown
Member

On the screen, it is not the computed background color that is seen by a user. Since DOM elements can be transparent, the background color might be one of the parent elements. This is why we need to traverse the DOM tree to find the background color of the first non-transparent parent element.

A more sophisticated solution would be to also use blending when there is a non-fully transparent background color. I think that might be a bit overkill for now.

See also spacetelescope/jdaviz#2264 (comment)

References

Code changes

User-facing changes

Backwards-incompatible changes

On the screen, it is not the computed background color that is seen
by a user. Since DOM elements can be transparent, the background
color might be one of the parent elements. This is why we need to
traverse the DOM tree to find the background color of the first
non-transparent parent element.

A more sophisticated solution would be to also use blending when
there is a non-fully transparent background color. I think that
might be a bit overkill for now.

See also spacetelescope/jdaviz#2264 (comment)
@martinRenou martinRenou merged commit c7cc6b9 into bqplot:master Jul 11, 2023
@martinRenou martinRenou deleted the backport_1603 branch July 11, 2023 13:44
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.

2 participants