briangonzalez/rgbaster.js

Option to get hexa instead of RGB ?

Closed this issue · 2 comments

Hi,

I wanted to use RGBaster with Trianglify but RGBaster gives color in RGB and Trianglify get colors in hexadecimal.
What do you think about an option to get colors in their hexadecimal form ?
Thanks

Can you do the conversion yourself on the fly?

The algorithm is simple enough:

function rgbToHex(r, g, b) {
  return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
}