Embedding vector graphics using standard HTML <img src="icon.svg"> tags offers strong browser caching and asset modularity. However, because external images are sandboxed across document boundaries, developers cannot set inline fill or stroke attributes in CSS.
The Filter Pipeline Equation
To map a pure black coordinate [0, 0, 0] to an arbitrary target RGB coordinate [R, G, B], the filter solver applies a sequential series of 3x3 color matrix transformations:
- invert(P): Translates [0, 0, 0] along the grayscale luminance axis toward white [255, 255, 255].
- sepia(Q): Imparts a warm golden baseline that anchors the color space coordinates.
- saturate(S): Expands chromatic intensity to produce rich, deep shades without chromatic degradation.
- hue-rotate(θ): Rotates the color wheel by θ degrees (0° to 360°) to align with the target hue angle.
- brightness() & contrast(): Fine-tunes perceptual luminance to eliminate loss delta.