hobbyvast.blogg.se

Light blue color code for processing
Light blue color code for processing











light blue color code for processing

And with color on the screen, you are mixing light, not paint, so the mixing rules are different as well. First, the primaries are different: red, green, and blue (i.e., "RGB" color). Digital colors are also constructed by mixing three primary colors, but it works differently from paint. The more paint you added, the darker it got. Swirling all colors together resulted in a muddy brown. Remember finger painting? By mixing three "primary" colors, any color could be generated. In addition, if we draw two shapes, p5.js will always use the most recently specified stroke and fill, reading the code from top to bottom.

light blue color code for processing

Also, remember not to eliminate both-with noStroke() and noFill(), nothing will appear! Our instinct might be to say "stroke(0)" for no outline, however, it is important to remember that 0 is not "nothing", but rather denotes the color black. Stroke or fill can be eliminated with the functions: noStroke() and noFill(). Stroke(0) // Setting the outline (stroke) to blackįill(150) // Setting the interior of a shape (fill) to grey Here's an example.īackground(255) // Setting the background to white There is also the function background(), which sets a background color for the window. In between, every other number-50, 87, 162, 209, and so on-is a shade of gray ranging from black to white.īy adding the stroke() and fill() functions before something is drawn, we can set the color of any given shape. Let's start with the simplest case: black & white or grayscale. Color, rather, is defined as a range of numbers. Saying "Hey, can you make that circle bluish-green?" will not do. In the digital world, when we want to talk about a color, precision is required. If you find any errors or have comments, please let us know. This tutorial is from the book Learning Processing by Daniel Shiffman, published by Morgan Kaufmann, © 2008 Elsevier Inc.













Light blue color code for processing