get RGBA values as an object


/ Published in: JavaScript
Save to your folder(s)

this function gets a parameter like an hex color (es: "#ffffff"), an abbreviated hex color (es: "#fff"), an rgb color (es: "rgb(255,255,255)") or an rgba color (es: "rgba(255,255,255,1)"), and returns an object containing the rgba values, like { red:x, green:y, blue:z, alpha:k }.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.