You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Custom Highlight API Extensions] Color composition #1434
For color specifically, if there’s overlapping higlights, we pick a single color
The painted color could be the result of compositing the colors in highlight order on top of the underlying color. These colors could each by partially translucent in order to apply subtle effects, e.g. black + highlight color rgba(255, 0, 0, 0.5) + highlight color rgba(0, 0, 255, 0.5) would result in rgb(64, 0, 127). This would allow them to not suddenly override colors mixing over time. The main thing you can't do with this is make it more transparent, which you could do with the opacity property.
Activity
kbabbitt commentedon Nov 3, 2026
I might be misunderstanding your suggestion, but picking the topmost color is already spec'ed and shipped behavior, and I didn't want to mess with that. https://drafts.csswg.org/css-pseudo-4/#highlight-text