These are awesome! Will use this on my next project! Do these work on all browsers? And how's the performance?
Show HN: GradientMagic
31–39 of 39 posts
Re: Show HN: GradientMagic
#32Are not these much heavier than SVG image backgrounds? I tested by putting five backgrounds into my real web project and scroll does not seem smooth anymore.
Re: Show HN: GradientMagic
#33Re: Show HN: GradientMagic
#34My current go-to resource for gradients is https://uigradients.com . One feature I'd personally appreciate is a programmatic interface for getting a list of gradients, it's handy for generating dynamic backgrounds.
As far as an API goes, how would you organize the input/output for dynamic backgrounds? Maybe send a style and colors, and get a random gradient of that color?
Re: Show HN: GradientMagic
#35Re: Show HN: GradientMagic
#36Hey HN! GradientMagic is a side project that I launched roughly a year ago. It’s a large gallery of unique CSS gradients. You can browse the different patterns and copy the CSS with a single click, no login required. CSS gradients are often preferable to images since they are usually much smaller and easier to manage. I would love any feedback or improvement ideas, but my real question is this: is it worth my time to…
Re: Show HN: GradientMagic
#37Earlier quoted context omitted.
FWIW html2canvas is pretty good for all html-screenshotty things. Might work here as well. https://html2canvas.hertzen.com/
Good as html2canvas is, these days you may get more milage creating an SVG, putting the HTML content in it as a ForeignObject, and then using the browser's ability to copy an image to a canvas with the SVG as the source. I use that technique in a very complex diagramming app I work on and it never seems to fail regardless of the HTML content. Getting fonts and external styles to work is fun but that wouldn't apply he…
Re: Show HN: GradientMagic
#38Re: Show HN: GradientMagic
#39My current go-to resource for gradients is https://uigradients.com . One feature I'd personally appreciate is a programmatic interface for getting a list of gradients, it's handy for generating dynamic backgrounds.
uigradients is really nice, although they only have linear gradients (which look really good). I created Gradient Magic to highlight the large variety of styles and patterns that are possible. As far as an API goes, how would you organize the input/output for dynamic backgrounds? Maybe send a style and colors, and get a random gradient of that color?