colorMode() question
in
Programming Questions
•
3 years ago
Hi,
I do have a sketch which "on-the-fly" creates some colors using the HSB model, so I was using colorMode(HSB,1,1,1,1).
Other parts of the sketch, however, use the RGB model, so I switch between these two models every so often.
This was fine, until I started using mutliple-threads and now the various calls of colorModel() started to interfere and I had to get rid of them.
My question now is:
What is the best way of defining a color with known HSB values (as numbers) while being in RGB colormode, but
without actually switching the colorMode() ?
Or spelled out: I do have 3 variables containing the H S and B value (ranged 0..1) of a color and I want to create a color variable of that color, but I do not want to leave the colorMode(RGB).
1