Back to Svgo

convertColors

docs/04-plugins/convertColors.mdx

4.0.1733 B
Original Source

Converts color references to the shortest equivalent.

Colors can be represented in various notations, the following table showcases some equivalent colors:

Namergb()#rrggbb#rgb
redrgb(255, 0, 0)#ff0000#f00
orangergb(255, 165, 0)#ffa500
yellowrgb(255, 255, 0)#ffff00#ff0
greenrgb(0, 128, 0)#008000
bluergb(0, 0, 255)#0000FF#00f
purplergb(128, 0, 128)#800080

It makes no difference which format is received by a client, and each one has wide support across browsers and image viewing software.