-
Notifications
You must be signed in to change notification settings - Fork 12
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
Clipboard content's does not work well with dark theme #11
Comments
]: how disappointing I'm curious about the best way to approach this. Right now the plugins have 100% control of that part of zazu, including the background color. We could pass in a "dark" or "light" flag maybe. |
It has a really neat built-in way of dealing with colors when you copy a hex color code to the clipboard. Can that be adapted? I wasn't knowledgeable enough to adapt it, but it's in: .zazu/plugins/tinytacoteam/zazu-clipboard/src/lib/present.js and the color formula thing is: .zazu/plugins/tinytacoteam/zazu-clipboard/node_modules/color/index.js I did fool around like a monkey at a typewriter trying to haphazardly figure out how it worked, but I'm not that technical. |
@cecoates what would the behavior be? We'd need some way of detecting the parent background color, right? Basically zazu would need to pass that in somehow. I see two options:
|
I may have kind sorta broken the plugin on my install, and I can't update it without crashing it again. :-) So I can't take a video of exactly what it was doing before I broke it, but this: const ago = require('s-ago') module.exports = (allClips) => { Seemed to detect if the clipboard contents was a hex color code. If it was, it used the formula in index.js:
To automatically adjust the background and font colors. Like if I copied yellow, it would make the background yellow, but the text black. Really cool! |
Got it! It only works if the color code uses capital letters. And here's the log: |
@cecoates isn't the issue not with showing colors, but showing normal text? I'm probably confused about the issue. |
@blainesch I was curious if the same thing that makes the background color and text color change when it's a hex color code could also be applied to text in general when you use the dark theme. Although now that I write that out, your suggestions make much more sense. Sorry! |
Black on black is very difficult to read.
The text was updated successfully, but these errors were encountered: