Week 5

Use of Color

Agenda

  • Quiz covering week 2 to week 4
  • RGB Model: building a foundation of color
  • Coding activity:

Quiz

You will have 35 minutes to complete the quiz. Good luck (and may the odds be ever in your favor)!!

Introduction to Color

The use of color is a big aspect in any visual display for two main reasons:

  • We need to make decisions about what colors to use and for what purpose
  • We must tell a computer those colors.

Common purposes for color usage

  • Data encoding:

  • Design aspects:

How do we specify color in a computational sense?

RGB Model

The Red Green Blue Model is based on the trichromatic theory.

RGB

Red, Green, and Blue light sources are combined to display colors on televisions and computer monitors.

RGB

Therefore, any color you see on a monitor can be described by a series of 3 values (in the following order):

  • Red value
  • Blue value
  • Green value

RGB Decimal Notation

## RGB Reference Colors . . .

Why do RGB values range from 0 to 255?

There are 256 numbers from 0 to 255

256 = 28

Hexadecimal Notation

RGB Reference Colors

Example notations: - Yellow: (255,255,0) -

rgb(200, 200, 200, maxColorValue = 255)
[1] "#C8C8C8"