Because it was not a big deal and might be usefull for one or the other i created also a javascript version of the bilinear gradient paint that one could use in HTML5 canvas. To make it possible i added one class that represents a color in the way that one could get the rgba values from a given color and a class that represents the bilinear gradient paint itself.
The result looks like this...
click here to see it live... |
function init() { }
You have to place the above script in your html page <head> tag. If you don't know how to do that just take a look at the page sourcecode of the linked page below the image.
Here are the two files you need to create the bilinear color interpolation.
RGBAColor.js
BiLinearGradient.js
Enjoy coding...
Hey there, I really like your work on gradients and colors. Any chance this info on HTML5 canvas bilinear gradients is still available? The links above do not seem to work.
ReplyDeleteThanks! - Ben
Hi Ben,
ReplyDeleteLink updated (please let me know if you encounter more of these linking problems because I moved everything to my DropBox instead of using the iDisk).
Cheers and thx for the hint,
Gerrit