Hex to RGB to Filter

Hex to RGB to Filter

Type any hex color into the input and this script will output the filter CSS attribute that matches that color as close as possible.

We use this to create hover affects where icons change color, mainly for SVG images.

Real pixel, CSS background-color:

Filtered pixel, CSS filter: