marcbruederlin / particles.js

A lightweight, dependency-free and responsive javascript plugin for particle backgrounds.

Home Page:https://marcbruederlin.github.io/particles.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: using CSS color names with connectParticles breaks the animation

dash0r opened this issue · comments

Hello,

You might want to look into this. If you define a color array (or string) with CSS color names (eg: seagreen, blue, yellow, red, etc.), and enable connectParticles, the animation fails.
Particles.init({
selector: "#particles",
color: ["seagreen", "yellow", "blue"], // this will fail
connectParticles: true // if this is set to true (it works fine if set to false)
});

It has to do with hextorgb (which doesn't understand color names). Might want to look into fixing this or documenting it!