Convert SVG Named Colors to Hex

Rewrite CSS color names to #hex — do not touch rgb(), hsl(), or hex that is already there

Colors → hex? Colors → hexReplace color? Replace color

FAQ

Quick answers

How do I convert SVG named colors to hex?
Click Convert names. fill, stroke, and stop-color written as CSS names (red, crimson, rebeccapurple, …) become #RRGGBB. none, currentColor, and url(#) stay.
How is this different from Convert SVG Colors to Hex?
The all-notation page also rewrites rgb(), hsl(), and 3-digit #RGB. This page only bakes names so a mixed file can keep rgb() or already-hex paints.
Does a name like red match #ff0000 on the hex page only?
The all-hex tool would rewrite both. Here #ff0000 and rgb(255,0,0) are left alone; only the token red is replaced. Replace SVG Color if you need to retarget one hex everywhere.
Are gradient stop-color names converted too?
Yes. Named stop-color on linearGradient and radialGradient becomes hex. Paints inside mask, clipPath, pattern, and marker are skipped so luminance masks can keep keyword white/black.
Colors → hex → Replace color → Colors → CSS variables → Colors → currentColor →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina