How to “tint” image with css

前端 未结 6 1830
你的背包
你的背包 2020-12-15 04:05

I try to tint an image with the background attribute like this:

6条回答
  •  情话喂你
    2020-12-15 04:41

    I used some combined filters for tinting an image completely. Tinting is not possible directly (with filters), but you can paint it sepia, adapt saturation and brightness, and get the desired color by using hue-rotate... I think it was something like this ...

    img {
      filter: sepia(100%) saturate(300%) brightness(70%) hue-rotate(180deg);
    }
    

    You will need to adapt it to your needs... Hope that helps.

    Best regards, Alex

提交回复
热议问题