The right color is received by InlineTextBox::paintCompositionUnderline(), but for some reason colorByApplyingColorFilter() always returns a null color for any given color.
The problem was not colorByApplyingColorFilter(), I assumed that was called with the given color, but that's not the case because underline.compositionUnderlineColor is always CompositionUnderlineColor::TextColor. This is because compositionUnderlineColor is not encoded/decoded in the IPC messages.
Created attachment 388023 [details] Patch
Comment on attachment 388023 [details] Patch Don't we have tests for this?
Unit tests, but it's not easy to test that the color passed from the API is the actual color of the underline when composing.
Committed r254742: <https://trac.webkit.org/changeset/254742>