Random Color + Background

Davide Riboli's Avatar

Davide Riboli

05 Jan, 2013 03:44 PM


I'm totally new to Nodebox [downloaded yesterday] and - first things first, let me thank you for your work. It's a great tool!

Now two newbie questions:

1] Is it possible to change the background color? It's easy to edit an image, but not so easy to edit an anim.

2] Can you point me in the right directions to understand how to generate random color?

Thanks again.

  1. Support Staff 1 Posted by Frederik De Ble... on 06 Jan, 2013 11:46 AM

    Frederik De Bleser's Avatar

    There is no dedicated "background color" node. But what you can do is create a rectangle, colorize it using the desired color, then use a combine node to merge the background rectangle with your composition.

    You can represent color using the HSB or RGB color space. Both require three numbers, all of which can be randomized using e.g. a random numbers node:

    • Create a random numbers node. Set the end to 255 (the default max value for a color parameter)
    • Create a HSB color node. Set saturation and brightness to 255
    • Connect the random numbers to the hue port of the HSB color node. This will give you 10 (= the amount of random numbers) random colors.
    • You can use these colors as the input to the fill / stroke port in a colorize node.
  2. Frederik De Bleser closed this discussion on 06 Jan, 2013 11:47 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Jun, 2024 02:26 PM
15 Jun, 2024 01:44 PM
08 Jun, 2024 09:05 AM
08 Jun, 2024 09:00 AM
04 Jun, 2024 04:37 AM