Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colored text #69

Closed
hanako-eo opened this issue Apr 5, 2021 · 3 comments
Closed

colored text #69

hanako-eo opened this issue Apr 5, 2021 · 3 comments

Comments

@hanako-eo
Copy link

image
hello, I want to make like that, but it's not possible with the library

@hcodes
Copy link
Collaborator

hcodes commented Apr 12, 2021

Take the dominant color at the edges of the images. For the text color, use the dominant color of the entire image. You may need to select a color for the color text to have the desired contrast.

@Oha-you
Copy link

Oha-you commented May 3, 2021

This article might also help: https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/
I still haven't tried it with this library, but it's a good start.

@Oha-you
Copy link

Oha-you commented May 3, 2021

Also FYI, alternative packages already have functions that pick good-looking text colors:

I think my lazy ass is gonna use node-vibrant because I also need some text to be placed on top of the average colored background. And I don't want to spend too much time on it...

@hcodes hcodes closed this as completed Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants