Programmatically determine best foreground color to be placed onto an image

前端 未结 3 1161
[愿得一人]
[愿得一人] 2021-02-02 00:11

I\'m working on a node module that will return the color that will look best onto a background image which of course will have multiple colors.

Here\'s what I have so fa

3条回答
  •  生来不讨喜
    2021-02-02 00:46

    It depends on where the text is that is overlayed on the background image. If the background has some large feature on part of it, the text will likely be placed away from that, so must contrast with that part of the image, but you may also want to pick up a certain color or complement the other colors in the image. I think practically speaking you will need to create a widget for people to easily slide/adjust the foreground color interactively. Or you will need to create a deep learning system in order to do this really effectively.

提交回复
热议问题