Real pixel, color applied through CSS background-color:

Filtered pixel, color applied through CSS filter:

The goal was to be able to create custom style sheets and allow for the coloring of icons for  Creating a Dovetail Agent Theme.


For this code to work well the starting color needs to be black. If your icon set isn't black you can prepend "brightness(0) saturate(100%)" to your filter property which will first turn the icon set to black.

For as long as I worked on creating this solution from multiple resources I found some had spent far longer to create this already completed solution. Only slightly modified to focus on HEX colors.

The CSS Convert Hex to Filter from Black Generator tool is a tool used to generate CSS code for converting a hexadecimal color value to a filter that adjusts the brightness of an element from black. The filter effect is applied to the CSS property "filter" and changes the brightness of the element from black to the desired color.

The CSS Convert Hex to Filter from Black Generator tool works by allowing users to input a hexadecimal color value and then automatically generating the CSS code required to apply the filter effect.

Some benefits of using the CSS Convert Hex to Filter from Black Generator tool include:

  • Easy and efficient conversion of hexadecimal color values to filter effects
  • No need to manually write CSS code
  • Ability to preview the filter effect before using it on a website
  • Improved consistency and accuracy of color values in a website's design

To use the tool, simply input the hexadecimal color value and hit the "generate" button. The resulting CSS code can then be copied and pasted into the website's code.