hexadecimal color and alpha value?

Hi,

In Processing I could write something like this: col = color(#2010BB, 50); but apparently I can't in p5.js?

That's kinda annoying since I want to use a palette array with hex color codes and the sketch should pick the colors from that array with a certain alpha.

Or am I missing something? Thanks!

Tagged:

Answers

  • p5.js's color() got much more parameter options than Processing's:
    http://p5js.org/reference/#/p5/color

    The # implies 100% opaque color, even though in Processing we can override the alpha.
    For p5.js, you're gonna need to choose what's offered there I'm afraid. :-\"

Sign In or Register to comment.