如何使用HTML5-Canvas对图像进行着色?基于十六进制或RGB颜色值作为输入?
发布于 2011-06-28 16:37:33
试试CamanJS。
Colorize滤镜看起来就是您想要的:http://camanjs.com/docs/filters.html#section-13
将图像中的颜色均匀地朝向给定的颜色移动。
调整范围为0到100。该值越高,图像中的颜色越接近给定的调整颜色。
Caman("#image", function () {
// Explicitly give the R, G, and B values of the
// color to shift towards.
//
// Arguments: (R, G, B, strength)
this.colorize(25, 180, 200, 20);
// The other way is to specify a color in hex form:
this.colorize("#4090D5", 20);
});有关内置过滤器的更多示例,请访问http://camanjs.com/guides/#BuiltIn
发布于 2011-06-28 04:48:42
您可以使用Pixastic。
发布于 2013-11-12 23:31:27
您也可以使用Tancolor。这是一个轻量级的jquery插件,用来给图像着色。你可以在interactive page上试用组合。
https://stackoverflow.com/questions/6498720
复制相似问题