Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Responsive Color

20,324 views

Published on

Color is one of the first things we learn how to do in CSS — and yet many of us don't ever go further than typing hex numbers handed to us by a designer. But getting colors to appear on a screen is just the beginning. Find out why colors look different on different devices, and what you can do about it. Learn how to adjust colors with media queries to make sure your colors look their best on any screen size. Find out how user context may affect the appropriate colors for a website. And finally, learn how you can make this whole color thing a lot less complicated by using a CSS preprocessor like Sass to manage your color choices and create color variations automatically.

Presented in 2015 & 2016 at Amazon's WebDevCon, ConFoo, Breaking Development, Mobile+Web Dev Conference, Code Fellows Seattle, CascadiaFest, CSS Summit, CSS Brigade Vancouver, CSS Day Amsterdam, Future Insights Live, WebVisions NYC, and Albany UX.

Published in: Design

Responsive Color

  1. 1. Image credit: Dave Gough www.flic.kr/p/oDGsY Responsive Color Clarissa Peterson ✦ @clarissa ✦ June 2015
  2. 2. Credit: flic.kr/p/7E3TZ6
  3. 3. Credit: Steve Snodgrass flic.kr/p/8twyMD
  4. 4. Credit: flic.kr/p/fczzhQ
  5. 5. http://commons.wikimedia.org/wiki/File:IBM_PC_5150.jpg
  6. 6. Credit: flic.kr/p/6AELnT
  7. 7. Credit: flic.kr/p/4Mioyn
  8. 8. Hue - Value - Saturation
  9. 9. Hue
  10. 10. Credit: MaxPower commons.wikimedia.org/wiki/File:HLSColorSpace.png
  11. 11. Value
  12. 12. Credit: Zoetnet flic.kr/p/8oKkbJ
  13. 13. Credit: Zoetnet flic.kr/p/8oKkbJ
  14. 14. Saturation
  15. 15. Credit: Pawsitive Candie N flic.kr/p/7Rb4Yp
  16. 16. Color Notation in CSS
  17. 17. Credit: Pengo commons.wikimedia.org/wiki/File:Pixel_geometry_01_Pengo.jpg
  18. 18. 256256 256
  19. 19. RGB Notation
  20. 20. 0-2550-255 0-255
  21. 21. color: rgb(200,0,100);
  22. 22. color: rgb(75%,0%,50%);
  23. 23. 00-FF00-FF 00-FF
  24. 24. color: #A9C862;
  25. 25. HSL Notation
  26. 26. color: hsl(120, 100%, 50%);
  27. 27. color: hsl(120, 100%, 50%);
  28. 28. color: hsl(120, 100%, 50%);
  29. 29. color: hsl(120, 100%, 50%);
  30. 30. color: hsl(120, 50%, 50%);
  31. 31. color: hsl(120, 50%, 20%);
  32. 32. color: hsl(120, 50%, 80%);
  33. 33. Opacity
  34. 34. RGBa Notation
  35. 35. color: rgba(150,0,25,1); color: rgba(0%,50%,40%,0.5);
  36. 36. div { opacity: 0.2; }
  37. 37. HSLa Notation
  38. 38. color: hsla(120, 100%, 50%, .5);
  39. 39. Color Blindness
  40. 40. Normal Deuteranope Protanope Tritanope
  41. 41. Credit: thecrazyfilmgirl https://flic.kr/p/5X3ixX
  42. 42. Perception of Color
  43. 43. Credit: HomeSpot HQ https://flic.kr/p/ePQ8wy
  44. 44. Credit: Scott Feldstein https://flic.kr/p/6kaePP
  45. 45. Credit: JD Hancock https://flic.kr/p/7Hg1aa
  46. 46. What You Think You See
  47. 47. Screens
  48. 48. Credit: Rusty Clark flic.kr/p/dyy44R
  49. 49. Credit: flic.kr/p/gnmwty
  50. 50. Light
  51. 51. Credit: Quinn Dombrowski flic.kr/p/cqpNFU
  52. 52. Credit: Caroline flic.kr/p/bq1X3o
  53. 53. Credit: ClearFrost flic.kr/p/o9mSXd
  54. 54. @media (light-level: dim) { /* change the colors */ }
  55. 55. Credit: Jeremy Keith flic.kr/p/o9thWy
  56. 56. Responsive Color
  57. 57. Credit: Clive Darra https://flic.kr/p/5HjxAN
  58. 58. <link rel=”stylesheet” media=”print” href=”css/print.css”>
  59. 59. @media print { /* print styles here */ }
  60. 60. SASS
  61. 61. Color Variables
  62. 62. p { color: #278232; } $green: #278232; p { color: $green; }
  63. 63. $green $green-light $green-dark
  64. 64. $primary-background-color $button-border
  65. 65. Lighten & Darken
  66. 66. lighten($purple, 20%)
  67. 67. .box1 { background-color: #b650d9; } .box2 { background-color: #d9a4eb; } $purple: #b650d9; .box1 { background-color: $purple; } .box2 { background-color: lighten($purple, 20%); }
  68. 68. darken($purple, 40%)
  69. 69. $button: #b650d9; .button { background-color: $button; border:3px solid darken($button, 20%); box-shadow: 7px 6px 3px -2px lighten($button, 20%); }
  70. 70. Saturate & Desaturate
  71. 71. saturate($blue, 70%)
  72. 72. Grayscale
  73. 73. Inverse
  74. 74. sassme.arc90.com/
  75. 75. sassme.arc90.com/
  76. 76. sassme.arc90.com/
  77. 77. Blend
  78. 78. .blending { background-image: url(goat.png); background-color: purple; background-blend-mode: multiply; }
  79. 79. .blending { background-image: url(goat.png); background-color: purple; background-blend-mode: multiply; }
  80. 80. .blending { background-image: url(goat.png); background-color: purple; background-blend-mode: multiply; }
  81. 81. multiply
  82. 82. screen
  83. 83. overlay
  84. 84. darken
  85. 85. lighten
  86. 86. color-dodge
  87. 87. color-burn
  88. 88. hard-light
  89. 89. soft-light
  90. 90. difference
  91. 91. exclusion
  92. 92. hue
  93. 93. saturation
  94. 94. color
  95. 95. luminosity
  96. 96. luminosity
  97. 97. Credit:Tuncay flic.kr/p/njc9ph Clarissa Peterson clarissapeterson.com @clarissa

×