开发者

Automatically choose a good border color based on background color

I'm looking for any resources on choosing "good" colors based on one specified color. Specifically if I gave an input of say... #6e93a8, a nice corporate blue, it could spit out a darker blue for a border color and perhaps a white or black for text based on how dark the given color is. K开发者_StackOverflow中文版eep in mind I can input any hex value.

I have a feel this is just messing around with adding and subtracting hex values, but I'm hoping someone has done this before and has found some good resources or an algorithm.

Thanks! Matt Mueller


If you already know what you want to do to the colors and you just need an algorithm for transforming the colors then check this answer which contains the algorithm for converting between RGB and HSV (and back). From then on you can alter the HSV values (to make the colors ligher, darker etc) or apply rules if the color is dark or light.


Are you looking for an algorithm or just a tool? Kuler is a web-based tool for designing color schemes that I think would serve your purposes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜