Comments (5)
well , I'm using a simple algorithm to process faster for generating fb/bg.
maybe I should read the color_highlight's code to find how to improve it.
from colorv.vim.
By default, chrisbra/Colorizer just chooses black or white using
r*30 + g*59 + b*11 > 12000
(See ~ Colorizer/autoload/Colorizer.vim:1487).
I like ColorV's sophisticated coloring. But maybe ColorV can just have an option to choose black or white, for users who prefer maximum contrast.
from colorv.vim.
well, Don't have much time recently to get this small change..
any pull requests are welcome
from colorv.vim.
I made an implementation for s:prev_list() which functions similarly to Colorizer, with a threshold at 777777.
- let hi_fg = b:view_area==1 ? hex : s:rlt_clr(hex)
+
+ if b:view_area == 1
+ let hi_fg = hex
+ elseif g:colorv_preview_bw
+ let [y,i,q]=colorv#hex2yiq(hex)
+ " y = 47 for #777777, which should be middle gray.
+ let hi_fg = (y < 47) ? "#ffffff" : "#000000"
+ else
+ let hi_fg = s:rlt_clr(hex)
+ endif
But after trying it more, I don't like it. It badly distorts my perception of brightness. For example, 737373 looks much brighter than 787878 and even AAAAAA because of the selection of a white fg for the darker background. To me, it is so bad I would not even merge the option. My opinion is not important, but I don't like the feature enough to put my name on the commit. So if somebody else wants it, they can use it or come up with another solution.
from colorv.vim.
Fine~
Anyway , it's nice of you to explore this.
from colorv.vim.
Related Issues (20)
- ColorVview should check for # HOT 1
- call s:py_core_load() evan though no python environment HOT 1
- Invalid arguments for function has(*reltime) HOT 2
- Error: error with neocomplcache#get_context_filetype function. HOT 1
- How do you actually pick colors? HOT 16
- Can the preview for an edited color update after leaving ColorV window? HOT 3
- Function to insert a color? HOT 3
- "[ColorV] Could not read cache.^@ Vim(let):E484: Kann die Datei /home/tom/.vim_colorv_cache nicht öffnen" error HOT 1
- Changing colon or semicolon references causes colorv to malfunction
- Incorrect color preview for #888888 in 256-color xterm HOT 7
- Feature request: Unite integration HOT 2
- Silent mode HOT 3
- python error HOT 4
- Feature request: statusline integration HOT 1
- could not launch gvim with colorv plugin installed HOT 14
- Error while compiling colorpicker.c on macOS HOT 1
- Lowercase hex color HOT 1
- Error detected while processing function colorv#init[28]..<SNR>28_py_core_load: HOT 2
- Plugin breaks coc-snippets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorv.vim.