Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using color palettes

From: Interactive Data Visualization with Processing

Video: Using color palettes

In the last movie I showed you some of the ways that Processing allows you to work with colors in your sketches, specifically the ways to specify colors, both Grayscale and on RGB and HSB systems. In this movie I want to talk to you about color palettes or collections of colors. Now I've already been using these in a number of the sketches by specifying an array of colors, but I want to show you some of the resources that are available for creating and examining color palettes in your own sketches. I'll begin by creating a sketch here, putting the sketch name, I'll do a window 600x200, turn on anti-aliasing, I'm going to turn off the Stroke, because I'm going to be a number of circles.

Using color palettes

In the last movie I showed you some of the ways that Processing allows you to work with colors in your sketches, specifically the ways to specify colors, both Grayscale and on RGB and HSB systems. In this movie I want to talk to you about color palettes or collections of colors. Now I've already been using these in a number of the sketches by specifying an array of colors, but I want to show you some of the resources that are available for creating and examining color palettes in your own sketches. I'll begin by creating a sketch here, putting the sketch name, I'll do a window 600x200, turn on anti-aliasing, I'm going to turn off the Stroke, because I'm going to be a number of circles.

And then what I will do is I'll put ellipse and I want four circles in there, so they're going to be 120 pixels apart from each other. That will draw the first ellipse. Then I'm just going to update each of these, here we go. All right, so now I've got a code for four circles, and in fact, I can just make a drawing right now, and there's my four white circles on my gray background, but what I want to do is actually create a palette here that I can use with these.

So the first thing I'm going to do is I want to show you some of the resources for determining palettes that you can use in your own research. There are three in particular that I find useful. I'm going to go to a webpage now and one of them is called Color Brewer, it's colorbrewer2.org. Now this one was specifically written for cartography for doing maps and you may know about the famous four-color problem where they found that you can use just four different colors to separate any map, but this gives you ideas on how to separate things, as well as different palettes, and options like colorblind safe.

And from these you can get the codes for the colors that you're using in each of the systems. These are RGB codes for the three colors that are showing on the map right now. You can also get the CMYK which is used for printing, that's the cyan, yellow, magenta, and key color, that were black as well as hex codes for each of these. Another option that's available is called Color Scheme Designer and that's colorschemedesigner.com, which allows you to specify a particular color and you can start looking at ways of combining those colors. For instance, you can get a compliment to those colors.

In this case it's a blue or a triad or a tetrad or an analogic one, or the accented analogic, and so a different combinations of colors. What's one of the more interesting things about this is you can actually preview it as it would look on a webpage. So if you come down to the bottom you can see what it will look like a little lorem ipsum text. You see we have our accent color there at the bottom, right, or the dark page example, that one's a little bit overwhelming, but it is automatically generated.

Okay, and that's one of the nice things about the Color Scheme Designer, is it allows you to see an idea of what these color palettes would look like in place on a webpage. But the one that I prefer is the Kuler. Kuler from Adobe, and this is the servers where people create palettes and they register them, and they place them online, and what you can do is you can simply go there and click on them, and see a variety of different kinds of palettes.

Among the Crowds, Gypsy Tent, and aside from just seeing these, you can also click on this right here and you can get at all the codes for them. Click in the HSV, which is also the HSB the RGB codes that we usually use. The CMYK which is used for printing and the LAB system, that is also used occasionally, and the Hex codes for each one. Now truthfully what I find most useful is to come to Kuler, find a palette that I like and then copy each of the Hex codes over to Processing, and I end up with something like this.

So I can take this one, and let's just try looking at another one. How about backstage? And what I can do here with backstage is I can get the first color, just copy that and I'm going to go over to my Processing drawing, and I'm going to create an array and it's going to be a color, it's an array, and I'm going to call it backstage. So I don't put it here, the equals there, put backstage, and then in curly brackets I can start putting the codes.

I like to start with the background color or the base color, and I can kind of get the - no, actually I'll start with this one here, go from darkest to lightest. Great. And if you want to, you can also sign in and download this as an Adobe color file that can be used in other programs as well. So I've got an array here, I'm going to close it with the curly brackets and with a semicolon (;).

Now I'm going to do something that may seem a little funny. I'm going to create a second array, color and then I'm just going to call it palette, and that one is equal to backstage and the reason I'm going to do it that way is it allows me to create a standardized references to colors and I can change the palette if I want to. And so now what I can do is I can come down and put a background color for my sketch and I can simply specify that I want the first color in the array palette.

If I were to change to a different palette, I could copy it in here where backstage is and then simply change the name here and then all of the reference functions would remain the same, and I'd still know the name of the original palettes. So I found this is a helpful way to do things. So that sets the background, and then what I can do is I can then put in the fill for each of these colors, and I can use that in a similar system. I'll just call palette, because I now have a duplicate array named palette, and I can go through them in order.

So what I'm going to do is just go palette [1], [2], [3], [4]. I'll Save that and run it. And now you can see I've taken the palette that I got from Adobe's Kuler and I'm able to integrate it into my sketch here. You can decide whether this is one that you would want to use for one of your own visualizations but it is better than a random choice. Anyhow, these are some of the tools and some of the functions that are available for dealing with colors and then assembling an entire palette for pleasing combinations in your own sketches.

And I encourage you to explore each of those Web resources, the Color Scheme Designer, the Color Brewer, and the Adobe Kuler, also. That's the way of seeing the kinds of palettes and combinations that might be useful for your own sketches.

Show transcript

This video is part of

Image for Interactive Data Visualization with Processing
Interactive Data Visualization with Processing

72 video lessons · 12096 viewers

Barton Poulson
Author

 
Expand all | Collapse all
  1. 3m 16s
    1. Welcome
      58s
    2. What you should know
      1m 22s
    3. Using the exercise files
      56s
  2. 11m 51s
    1. Overview of data visualization
      11m 51s
  3. 11m 53s
    1. Installing Processing
      3m 38s
    2. Overview of Processing
      4m 5s
    3. Exploring libraries
      4m 10s
  4. 1h 1m
    1. Basic setup
      7m 31s
    2. Drawing points
      4m 37s
    3. Drawing lines
      5m 6s
    4. Drawing ellipses and circles
      5m 24s
    5. Drawing arcs
      6m 54s
    6. Drawing rectangles and squares
      4m 58s
    7. Drawing quadrangles
      3m 25s
    8. Drawing triangles
      2m 55s
    9. Drawing polygons
      3m 37s
    10. Drawing simple curves
      4m 54s
    11. Drawing complex curves
      6m 46s
    12. Drawing Bézier curves
      5m 38s
  5. 54m 3s
    1. Introduction to variables
      10m 44s
    2. Understanding variable scope
      6m 53s
    3. Modifying variables
      9m 8s
    4. Creating arrays
      9m 53s
    5. Modifying arrays
      6m 37s
    6. Creating strings
      7m 3s
    7. Modifying strings
      3m 45s
  6. 1h 2m
    1. Incorporating randomness
      7m 59s
    2. Using Perlin noise
      4m 24s
    3. Shuffling with Java
      3m 30s
    4. Specifying line attributes
      8m 2s
    5. Changing placement modes
      5m 45s
    6. Understanding color attributes and functions
      4m 16s
    7. Exploring color spaces
      7m 44s
    8. Using color palettes
      7m 5s
    9. Transforming the grid
      8m 38s
    10. Exploring the attribute matrix
      5m 33s
  7. 52m 7s
    1. Building code blocks
      5m 57s
    2. Writing a while loop
      3m 52s
    3. Using for loops
      5m 35s
    4. Creating conditionals
      14m 50s
    5. Working with easing
      10m 51s
    6. Creating spirals
      11m 2s
  8. 18m 55s
    1. Mouse tracking
      3m 54s
    2. Hovering and clicking
      11m 16s
    3. Understanding keyboard interaction
      3m 45s
  9. 27m 32s
    1. Specifying fonts
      6m 43s
    2. Using images
      5m 51s
    3. Playing a video loop
      6m 20s
    4. Exporting video
      3m 47s
    5. Adding sound
      4m 51s
  10. 20m 49s
    1. Creating functions
      11m 48s
    2. Creating classes and objects
      9m 1s
  11. 31m 10s
    1. Using embedded data
      5m 26s
    2. Working with appended text data
      6m 4s
    3. Working with appended tabular data
      10m 26s
    4. Reading XML data
      9m 14s
  12. 48m 17s
    1. Generating dot plots
      11m 11s
    2. Building scatter plots
      10m 0s
    3. Making line plots
      9m 55s
    4. Creating bar charts
      9m 12s
    5. Checking out examples of maps, hierarchies, and networks
      7m 59s
  13. 20m 57s
    1. Introducing some principles of 2D design
      13m 44s
    2. Understanding color theory
      7m 13s
  14. 24m 46s
    1. Interacting with zooming, rotating, and sliding
      6m 26s
    2. Implementing slicing
      6m 47s
    3. Using rollovers
      5m 58s
    4. Introducing the GUI libraries
      5m 35s
  15. 10m 35s
    1. Sharing via OpenProcessing and other sites
      3m 19s
    2. Saving as a desktop application
      2m 42s
    3. Saving as JavaScript
      1m 47s
    4. Saving as an Android application
      2m 47s
  16. 2m 38s
    1. Where to go from here
      2m 38s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Interactive Data Visualization with Processing.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.