Many CSS "RGB split" effects put red and cyan text-shadow copies behind white text. They look like colored outlines, because nothing is actually being split.
Real chromatic aberration separates light . Red, green and blue add up to white where they line up, and color appears only where they don't. One CSS property gives you that: mix-blend-mode: screen .
The short version
Make the text pure green, add a red and a blue copy, and blend both with screen :
<span class = "rgb" data-text = "SIGNAL" > SIGNAL </span>
Enter fullscreen mode
Exit fullscreen mode
.rgb { position : relative ; display : inline-block ; isolation : isolate ; color : #0f0 ; /* green channel */ }
.rgb : : before , .rgb : : after { content : attr ( data-text ) ; position : absolute ; inset : 0 ; mix-blend-mode : screen ; /* R + G + B = white */ pointer-events : none ; }
.rgb : : before { color : #f00 ; transform : translateX ( -3px ) ; } .rgb : : after { color : #00f ; transform : translateX ( 3px ) ; }
Enter fullscreen mode
Exitβ¦