Change text color based on brightness of the covered background area?

前端 未结 8 1625
悲哀的现实
悲哀的现实 2020-11-27 09:53

I\'ve thought about the following for a while already, so now I want to know your opinions, possible solutions, and so on.

I am looking for a plugin or technique tha

8条回答
  •  无人及你
    2020-11-27 10:13

    I've found the BackgroundCheck script to be very useful.

    It detects the overal brightness of the background (be it a background image or a color), and applies a class to the assigned text-element (background--light or background--dark), dependent on the brightness of the background.

    It can be applied to still and moving elements.

    (Source)

提交回复
热议问题