TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Adaptive Backgrounds – A jQuery plugin for extracting dominant colors

176 点作者 nsmalch超过 11 年前

13 条评论

iamthepieman超过 11 年前
I haven&#x27;t looked at the source in great detail yet so maybe you already have this feature.<p>It would be nice if you could specify an offset along the color wheel to select complimentary or analogous colors.<p>The default of selecting the dominant color removes all contrast between the image and the background which seems like a rarely desired behavior.
ronaldx超过 11 年前
Firstly, I like it. It&#x27;s an elegant solution that gives excellent results and works as it says.<p>Secondly, I don&#x27;t like it. In the general case, this is not something that should be left to the client to calculate - whenever you are serving the image, the server ought to know what the dominant colour is. Why make the client calculate this every time the image is displayed?<p>This is a case where JavaScript harms the user: a JavaScript&#x2F;jQuery solution to this has significant potential problems: there are numerous cases where it will break, some of which are identified in the other comments.
评论 #6906472 未加载
评论 #6906386 未加载
评论 #6907805 未加载
prezjordan超过 11 年前
Beware when you host assets directly from your GitHub source tree. They limit requests - I had to refresh a few times.<p>Throw a copy of your javascript in the actual gh-pages branch.
评论 #6906720 未加载
gprasanth超过 11 年前
This is one my favorite questions on StackOverflow: <a href="http://stackoverflow.com/q/13637892/1273830" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;q&#x2F;13637892&#x2F;1273830</a>
eliot_sykes超过 11 年前
RGBaster.js looks to be the underlying library used by the plugin to extract the colors, its written by the same developer (briangonzalez):<p><a href="https://github.com/briangonzalez/rgbaster.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;briangonzalez&#x2F;rgbaster.js</a>
评论 #6906800 未加载
nchapman超过 11 年前
It seems like the problem with it not working very time is Github. I get a 503 on this URL every other time that I load it: <a href="http://rawgithub.com/briangonzalez/jquery.adaptive-backgrounds.js/master/src/jquery.adaptive-background.js" rel="nofollow">http:&#x2F;&#x2F;rawgithub.com&#x2F;briangonzalez&#x2F;jquery.adaptive-backgroun...</a>
评论 #6906143 未加载
Keyframe超过 11 年前
I don&#x27;t get it. Tried in several browsers and nothing happened.
评论 #6905817 未加载
评论 #6905815 未加载
K0nserv超过 11 年前
It wasn&#x27;t working for me and I got the following error &quot;Uncaught IndexSizeError: Index or size was negative, or greater than the allowed value.&quot;. However it worked in incognito mode, I could reproduce the problem by enabling Disconnect in incognito mode. If you are having troubles try using incognito mode.
评论 #6905864 未加载
chenster超过 11 年前
Clever. How does it actually extract the dominant color? What kind of mathematics involved in this kind of stuff? From an architect point of view, does it make sense to do this on the client side?
评论 #6908384 未加载
wittekm超过 11 年前
This looks fantastic. I don&#x27;t think I&#x27;ll ever find a good use for it, but I may shoehorn it into something anyways. It&#x27;s really pretty!
deevus超过 11 年前
Like the example on the repo page, I think this could be really useful for images that are not the right size for its container.
coherentpony超过 11 年前
Just see some images. Not sure what I&#x27;m supposed to be looking at.
TallboyOne超过 11 年前
This is great and all .. but it doesn&#x27;t work in the latest chrome?
评论 #6905809 未加载
评论 #6905819 未加载
评论 #6906802 未加载