Table of Contents for
Web Design Blueprints

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Web Design Blueprints by Benjamin LaGrone Published by Packt Publishing, 2016
  1. Cover
  2. Table of Contents
  3. Web Design Blueprints
  4. Web Design Blueprints
  5. Credits
  6. About the Author
  7. About the Reviewer
  8. www.PacktPub.com
  9. Preface
  10. What you need for this book
  11. Who this book is for
  12. Conventions
  13. Reader feedback
  14. Customer support
  15. 1. Responsive Web Design
  16. Getting familiar with the basics
  17. Using media queries for responsive design
  18. Working with responsive media
  19. Building responsive layouts
  20. Summary
  21. 2. Flat UI
  22. Flat UI color
  23. Creating a flat UI layout
  24. Summary
  25. 3. Parallax Scrolling
  26. Color classes
  27. Using SVG font icons
  28. Getting the fonts
  29. That's no moon!
  30. OMG, it's full of stars!
  31. Clouds, birds, and airplanes
  32. The rocket
  33. Terra firma
  34. Next up, the CSS
  35. Styling the objects with CSS
  36. Styling the ground objects
  37. Writing the JavaScript effects
  38. Setting the row height
  39. Spreading the objects
  40. Spreading the clouds
  41. Loading the page functions
  42. Smoothening the scroll
  43. Updating elements on the scroller
  44. Collecting the moving elements
  45. Creating functions for the element types
  46. Setting the left positions
  47. Creating the rocket's movement function
  48. Finally, moving the earth
  49. Summary
  50. 4. Single Page Applications
  51. Getting to work
  52. Getting the old files
  53. Object and function conventions
  54. Creating utility functions
  55. Working with the home structure
  56. Setting up other sections
  57. Performing housekeeping
  58. Creating a callBack function for the API
  59. Summary
  60. 5. The Death Star Chapter
  61. Dropping in the parallax game
  62. Loading elements from JSON
  63. What can be done in the shared levels service
  64. Editing the home JavaScript
  65. Creating the other pages – credits and leaderboard
  66. Creating the second level
  67. Summary
  68. Index

Flat UI color

Flat UI brings about a dramatic change in the way color is used in web design. Since the designs are no longer skeuomorphic, designers are more reliant on color and color contrast to relay information on the screen.

Flat UI tends to use more saturated, bright colors instead of grey, white, or black. You can use many different shades, as long as the tone and depth of the colors match. Often, the more simple color palettes are used, but the primary objective is to use colors that help convey the content as opposed to using color to mimic a 3D everyday object. The key is to go for simplicity.

There are a number of online tools to help you create a flat UI color palette. You can take a look at http://flatuicolors.com for a good sample of color codes. You can also visit http://www.colorhexa.com/ for a good color-matching tool.

Sample color swatches for flat UI

This section has a few sample color swatches for you to view. Each swatch has descriptions and reasons you might want to use it. Over at DesignModo, a design company and blog that focuses on flat UI design, there are more swatches like these you can look at:

http://designmodo.com/flat-design-colors/

Let's take a look at the color swatches now.

The vivid color swatch

Many style guides on flat UI design recommend using vivid colors to convey simplicity and let the actual content tell the story. This is a good swatch to start with:

The vivid color swatch

The retro color swatch

Another popular color trend that mixes well with Flat UI is using retro colors. Retro colors have less saturated hues—bright with white added to make them muted and faded. Be careful; these are not pastel, but old school. Use lots of orange, yellow, some red, and blue. It is common to see primary and secondary colors because of the toning down of color.

Retro colors are best when they are the dominant color element and are paired with images or muted colors. The most popular are orange, peach, plum, and dark blue.

The retro color swatch

The monotone color swatch

A design trend I like and is very popular, especially for app design, is monotone colors. This color scheme relies on only a single color with black and white to create a bright, distinct palette. Use a base color and two or three tints for effect. As it is regarded a soothing color, the most popular color is blue, followed by green and grey.

Sometimes, a designer will pick grey but with a pop of color, such as red, for buttons and calls to action. Another option is to use a variation of color, for instance, a primary such as blue, but add tints of green.

Monotone color schemes need to include contrast, so mix tints so that each different color is distinct from the parent color. Go from 100% to 50% to 20%.

The monotone color swatch

Creating a color swatch for your project

You can also look at other online color guides for flat UI color schemes; https://flatuicolors.com/ is an excellent source for colors to use in your flat UI design project.

Finally, when you have decided on your style and created a color palette, you will next want to create a CSS style for them. Let's make it easy so you don't have to jump back and forth between your markup and style just to add colors. So, launch your IDE and create a new project for your flat UI design.

Inside the header of the HTML page you created, add a style tag. Inside it, we'll start adding some colors. Get your list of colors you have picked and list them inside the style sheet as selectors. For illustration, I'll use the colors in a code snippet. The Peter River color from https://flatuicolors.com really stands out. Let's use that to create a monochrome color palette for our flat UI project. We can also use the Wet Asphalt color for some of the darker colors. Here's the code snippet:

<style>
    .peter-river{
    background-color:#3498DB; /* r=52, g=152, b=219, 76% */
    }
    .wet-asphalt{
    background-color:#34495E; /* r=52, g=73, b=94, 45% */
    }
</style>

From here, let's create some tints for our Peter River color by modifying the tint by 10% increments.

The additional colors are as follows:

.color-1 { 
    background-color: #85C4ED; /* r=133, g=196, b=237, 44% */
}
.color-2 { 
    background-color: #58ADE3; /* r=88, g=173, b=227, 61% */
} 
.color-3 { 
    background-color: #0F85D1; /* r=15, g=133, b=209, 93% */
}
.color-4 { 
    background-color: #0665A2; /* r=6, g=101, b=162, 96% */
}

The color swatch for this is as follows:

Creating a color swatch for your project

Instead of assigning a color to div through CSS, we are going to assign the colors by creating a color for the class and assigning the class to the element. You will see how this works in the next section.