Category : gradient

I have this rainbow changing the background color of a div: var numberOfItems = 40; var rainbow = new Rainbow(); rainbow.setNumberRange(1, numberOfItems); rainbow.setSpectrum(‘#e8e2d1’, ‘2b2928’); var s = ”; var colors = []; for (var i = 1; i <= numberOfItems; i++) { var hexColour = ‘#’ +rainbow.colourAt(i); colors.push(hexColour) } was wondering if there was a ..

Read more

I know it’s pretty stupid, but I really don’t know why it does not work. I’m looking to make animated gradients like here: https://codepen.io/desandro/pen/BzJkQv. I’ve copied exactly all the lines, but it’s still white background. I’ve put everything in just a HTML script, here it is: <!doctype html> <html> <head> <meta charset="utf-8"> <title>home</title> <!–<link href="home_css.css" ..

Read more

I was using html canvas, creating context filling with alpha gradient color multiple time, and then I’ve noticed some white dot artifacts as the image shown below. Testing done in Chrome with Windows, using Nvidia GPU. It seems to be those pixels outside the limited gradient bound will create the dots. Code provided as below ..

Read more