Kristi Potter [email protected] cs 410/510 October 9, 2013 Color.

71
Kristi Potter [email protected] cs 410/510 October 9, 2013 Color

Transcript of Kristi Potter [email protected] cs 410/510 October 9, 2013 Color.

Page 1: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Kristi [email protected] 410/510

October 9, 2013

Color

Page 2: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Physics of Light

Page 3: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

The Electromagnetic Spectrum

Page 4: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

The Visible Spectrum

human visual system sensitive to ~380-780 nm

Wavelength, λ (nm)

Page 5: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Isaac Newton

- white light is a combination of all colors of the spectrum

- black is the absence of visible spectrum wavelengths

- separation of visible light into colors is called dispersion

objects appear colored by the character of the light they reflect

Page 6: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Perception“While light is a physical entity, color is a

perception...”-Margaret Livingstone

Page 7: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

The Eye

Page 8: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Retina- Optimized for acuity (rather than light

sensitivity)- Specialized neural circuitry does much of the

image processing - Complexity not fully understoodimage processing NOT image transmission

Light

Page 9: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Retinal Cells

Light

Page 10: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Pigment Epitheliumlight sink

- absorbs scattering light- other biological functions (e.g.

chemistry of the eye)

Light

Page 11: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Photoreceptorsrods & cones

- cones for day vision (small, medium, long)

- rods for night vision- binary signal on/off

Light

Page 12: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Rod & Cone Response

Page 13: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Conesresponse relies on both wavelength and intensity of light

- response magnitude alone doesn’t say anything (e.g. L cone: same intensity, different

wavelength)

- color is derived by comparing signals between cones

(red is signaled by a larger L response compared to M)

- unambiguous code for color through ratio between cones

ab

Page 14: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Why 3 cones?- cover the visible spectrum- correspond to/explain “primary colors”- theoretically possible with only 2 cones- most birds, some fish, reptiles &

insects have 4

Page 15: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Rodsnight vision / luminance

- Purkinje effecttendency of peak sensitivity to shift

toward blue at low illumination levels- red light doesn’t effect night

vision

day

dusk

night

Page 16: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Horizontal Cellsaccumulate across cones

- modulate photoreceptor signals under different light

- respond to light over a large area- react to the absence of light- defines the surround signal (more on

this later)

Light

Page 17: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Bipolar Cells accumulate rods OR cones

- also receives signals from horizontal cells

- emits ON-center or OFF-center- defines the center response

Light

Page 18: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Ganglion Cellsconnection to the brain

- axon bundle creates the optic nerve- at least 5 types based on function &

where they connectsome even photosensitive!

- selectively sensitive to discontinuities in light

Light

Page 19: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Center/Surroundorganization of the receptive field

- cells optimally excited by tiny spots of light

- light in the center excites, inhibits in the surround

(or vice-versa)- sensitive to discontinuities in light

patternsencode only changes in receptive field

+--

- - --

-

--

----

-

-

-

--

-- -

--

++

+ ++++

Page 20: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Perception Change in Light

Page 21: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Blindness

Page 22: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Blindnessdeficiency in color vision

- typically caused by faulty cone development

- found more in men than womenphotopigment genes carried in X-

chromosome - 5-8% of men and 0.5% of women

Page 23: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Types : monochromacy1 dimensional color vision

- 2 or 3 cone pigments are missing - total color blindness- very rare- rod monochromacy : non-functioning or

missing conesachromatopsia

- cone monochromacy : multiple deficient cones

multiple types of dichromacy

Page 24: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Types: dichromacy 2 dimensional color vision

- 1 cone pigment is missing- protanopia : absence of red receptors - deuteranopia : absence of green

receptors- tritanopia : absence of blue receptors

Page 25: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Types: Trichomacy 3 dimensional color vision

- 1 cone is altered in spectral sensitivity- impairment rather than loss- protanomaly : shift in red, poor red-green

discrimination- deuteranomaly : shift in green, poor red-

green discriminationmost common form of color deficiency

- tritanomaly : poor blue-yellow discrimination

Page 26: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Designing for Colorblindness

- vary in hue or saturation or brightness- monochrome color schemes- use queues besides/in addition to color- software solutions vischeck : (http://www.vischeck.com/)

Page 27: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Illusions

Page 28: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

- luminance the same at both ends- many perceptions more sensitive to

abrupt change (luminance, color, motion, depth)

- attributed to center/surround organization

Cornsweet Illusion

Page 29: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.
Page 30: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.
Page 31: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Contrast Effects- juxtaposition of colors effects our

perception of them- complimentary colors often most

effected- simultaneous : how colors can affect

each other- successive : how color can affect future

perception

Page 32: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Simultaneous Contrast

Page 33: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Simultaneous Contrast

Page 34: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Successive Contrast

look at a dot

then look at a dot

Page 35: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Equiluminant Colors

- strong contrast shapes to be seen by color sensitive cells

- equiluminance hides positions from light sensitive cells

- flickering/movement caused by this disconnect

Page 36: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Models

Page 37: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Subtractive Color (Print)

Page 38: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Subtractive Color (Paint)

Page 39: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Additive Color (Light)

Page 40: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Spaces

Page 41: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

RGB additive

- Red, Green, Blue channels- electron guns of crt monitors- device-dependent- float: (0.0-1.0) - int: (0 -255)- hex: (00-FF)

R

Page 42: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

CMYKsubtractive

- Cyan, Magenta, Yellow, Key (black)- inks used in printing- assumes white paper (non-existence

of ink)- often required for paper publications- device dependent

Page 43: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

HSV [B, L, I] additive

- Hue, Saturation, [Value, Brightness, Lightness, Intensity]

- polar coordinate representations of RGB space

- conical or cylindrical shaped space- more intuitive than RGB for color

tuning

Page 44: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

CIE LAB/LUVmathematically defined, perceptually based

- Commission Internationale de l'éclairage)

- Lightness, (a,b)/(u,v) color opponent dimensions

a: blue/yellow, b: green/redlightness (0% black, 100% white)

- space includes all perceivable colors (gamut greater than RGB, CMYK)

- device independent

Page 45: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

RGB to HSV// in: rgb(0.0,1.0) out: h(0,360), v(0.0,1.0), s(0.0,1.0)rgb2hsv(float r, float g, float b) // find the min and max of rgb maxColor = max(r, g, b); minColor = min(r, g, b); float delta = maxColor - minColor; float Value = maxColor; float Saturation = 0; float Hue = 0; if (delta == 0) Hue = 0; Saturation = 0; else Saturation = delta / maxColor; float dR = 60.f*(maxColor - r)/delta + 180.0; float dG = 60.f*(maxColor - g)/delta + 180.0; float dB = 60.f*(maxColor - b)/delta + 180.0; if (r == maxColor) Hue = dB - dG; else if (g == maxColor) Hue = 120 + dR - dB; else Hue = 240 + dG - dR; if (Hue < 0) Hue+=360; if (Hue > =360) Hue-=360;

C++ (ish)

Page 46: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

HSV to RGB// in: h(0,360), v(0.0,1.0), s(0.0,1.0) out: rgb(0.0,1.0)hsvToRGB(float hue, float saturation, float value) if( saturation == 0 ) // achromatic (grey) r = g = b = v; else{

hue /= 60.f;// sector 0 to 5 i = floor( hue );f = hue - i;// factorial part of hp = value * ( 1 - saturation);q = value * ( 1 - saturation * f );

t = value * ( 1 - saturation * ( 1 - f ) ); switch( i ): case 0: r = v; g = t; b = p; case 1: r = q; g = v; b p;

case 2: r = p; g = v; b = t; case 3: r = p; g = q; b = v; case 4: r = t; g = p; b = v; case 5: r = v; g = p; b = q;

}

C++ (ish)

Page 47: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Problems with Color (short list)

Page 48: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Misused Color

- bias a reader’s perception- cause the wrong information stand out- hide meaningful information- cause visual clutter and overload

“Color used poorly is worse than no color at all.”

-Edward Tufte

Page 49: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Coding- hard to pick discernible colors - can only get ~12 distinguishable colors- object size, line width can influence

perception

William S. Cleveland and Robert McGill."A Color-Caused Optical Illusion on a Statistical Graph".In The American Statistician, vol. 37, no. 2, pp. 101--105, 1983.

Page 50: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Issues with HSV- physical lightness ≠ perceived

brightness- no linear brightness gradient

http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/

same value

greyscale

step

step

Page 51: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Rainbow Colormaps

- not ideal for qualitative data - no inherent ordering (by wavelength?)- transitions between colors are uneven- mapping of changing value may not equal

the change we see

David Borland and Russell Taylor II."Rainbow Color Map (Still) Considered Harmful".In IEEE Computer Graphics and Applications, vol. 27, no. 2, pp. 14--17, Mar/April, 2007.

Page 52: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Best Practices

Page 53: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

If you want objects to look the same color,

make background colors consistent.

Page 54: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

If you want objects to be easily seen, use a background color that contrasts

sufficiently.

Page 55: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Use color only when needed to serve a particular communication goal.

Page 56: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Use different colors only when they correspond to differences of meaning

in the data.

Page 57: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Use soft, natural colors to display most information and bright and/or

dark colors to highlight.

Page 58: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Stick with a monochromatic color scheme when encoding quantitative

values.

Page 59: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Non-data components should be displayed just visibly enough to

perform their role.

Page 60: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

To accommodate for the colorblind, avoid using a combination of red and

green in the same display.

Vischeck/Daltonizehttp://www.vischeck.com/

Page 61: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Tips

Page 62: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Schemes- monochromaticvariations in lightness & saturation of a

single color- analogous

colors adjacent on the color wheel- complementarytwo colors opposite on the color wheel

monochromatic

analogous

complementary

Page 63: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Look to Nature

Page 64: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Simplicity- choose one color to be used in larger

amounts - be selective about the base color- use other colors to add interest

Page 65: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Avoidance of Color- use neutrals (work with any scheme)

black, white, grey- use diagrammatic marks (may be better

encoding channels) size, shape, texture, length, width, orientation, curvature and intensity

Page 66: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Tools for Color Scheme Creation

Page 67: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Kuhlerhttp://kuler.adobe.com

- pick a previously created “theme”- create a theme from color model- create a new theme from an image

Page 68: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Scheme Designerhttp://colorschemedesigner.com

- develop scheme based on a color model

- test out scheme on light and dark pages

Page 69: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Color Brewerhttp://colorbrewer2.org/

- pre-defined color schemes for mapssequential

optimized for data ordered low to highdiverging

place equal emphasis on mid-range and extremesqualitative

does not imply an order (categorical data)

Page 70: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

HCL Color Pickerhttp://tristen.ca/hcl-picker/

- pick equidistant colors in the HCL colorspace

- test color scheme out on a choropleth map

- addresses issues of HSV colorspace

Page 71: Kristi Potter kpotter@cas.uoregon.edu cs 410/510 October 9, 2013 Color.

Questions?References

- Cinematic Color, Jeremy Selan, Siggraph 2012 Course notes

- Measuring Color [Hunt, 1998]- Color Imaging: Fundamentals and Application [Reinhard,

et al. 2008]- Color Science [Wyszecki and Stiles, 1982] - The Science of Art

(http://www.imprint.co.uk/rama/art.pdf)- How the Retina Works

(http://www.americanscientist.org/libraries/documents/20058313632_306.pdf

)- Color Theory Methods for Visualization, Theresa-Marie

Rhyne, Vis 2012 Tutorial