HTML5 Flat Design Color Palette

HTML5 Flat Design Color Palette
Code Snippet:Flat Design Color Palette
Author: Lucas Cobb
Published: January 29, 2024
Last Updated: February 3, 2024
Downloads: 950
License: MIT
Edit Code online: CodeHim
Read More

The code effortlessly showcases a color palette of HTML5 flat colors, each assigned a unique name and hexadecimal code. Organized in a visually appealing manner, the colors are presented in a clean, structured layout. This code is a quick reference, helping you easily incorporate trendy flat design color schemes into your web projects.

How to Create HTML5 Flat Design Color Palette

1. First of all, incorporate the flat design color palette into your HTML file by copying the provided HTML code. Ensure that you include the entire <div> structure within the <body> tag of your HTML document.

  1. <div class="span4">
  2. <div class="todo mrm">
  3. <div class="todo-header">
  4. <h3 class="demo-panel-title">Flat Colors</h3>
  5. </div>
  6. <ul>
  7. <li class="todo-wrap one">
  8. <div class="todo-content">
  9. <h4 class="todo-name">
  10. GREEN SEA
  11. </h4>
  12. #16A085
  13. </div>
  14. </li>
  15.  
  16. <li class="todo-wrap two">
  17. <div class="todo-content">
  18. <h4 class="todo-name">
  19. EMERLAND
  20. </h4>
  21. #2ECC71
  22. </div>
  23. </li>
  24.  
  25. <li class="todo-wrap three">
  26. <div class="todo-content">
  27. <h4 class="todo-name">
  28. NEPHRITIS
  29. </h4>
  30. #27AE60
  31. </div>
  32. </li>
  33. <li class="todo-wrap four">
  34. <div class="todo-content">
  35. <h4 class="todo-name">
  36. PETER RIVER
  37. </h4>
  38. #3498DB
  39. </div>
  40. </li>
  41. <li class="todo-wrap five">
  42. <div class="todo-content">
  43. <h4 class="todo-name">
  44. BELIZE HOLE
  45. </h4>
  46. #2980B9
  47. </div>
  48. </li>
  49. <li class="todo-wrap six">
  50. <div class="todo-content">
  51. <h4 class="todo-name">
  52. AMETHYST
  53. </h4>
  54. #9B59B6
  55. </div>
  56. </li>
  57. <li class="todo-wrap seven">
  58. <div class="todo-content">
  59. <h4 class="todo-name">
  60. WISTERIA
  61. </h4>
  62. #8E44AD
  63. </div>
  64. </li>
  65. <li class="todo-wrap eight">
  66. <div class="todo-content">
  67. <h4 class="todo-name">
  68. WET ASPHALT
  69. </h4>
  70. #34495E
  71. </div>
  72. </li>
  73. <li class="todo-wrap nine">
  74. <div class="todo-content">
  75. <h4 class="todo-name">
  76. MIDNIGHT BLUE
  77. </h4>
  78. #2C3E50
  79. </div>
  80. </li>
  81.  
  82. <li class="todo-wrap ten">
  83. <div class="todo-content">
  84. <h4 class="todo-name">
  85. NIGHT SHADE
  86. </h4>
  87. #2C3E50
  88. </div>
  89. </li>
  90. <li class="todo-wrap elleven">
  91. <div class="todo-content">
  92. <h4 class="todo-name">
  93. SUN FLOWER
  94. </h4>
  95. #F1C40F
  96. </div>
  97. </li>
  98. <li class="todo-wrap twelve">
  99. <div class="todo-content">
  100. <h4 class="todo-name">
  101. ORANGE
  102. </h4>
  103. #F39C12
  104. </div>
  105. </li>
  106. <li class="todo-wrap thirteen">
  107. <div class="todo-content">
  108. <h4 class="todo-name">
  109. CARROT
  110. </h4>
  111. #E67E22
  112. </div>
  113. </li>
  114. <li class="todo-wrap fourteen">
  115. <div class="todo-content">
  116. <h4 class="todo-name">
  117. PUMPKIN
  118. </h4>
  119. #D35400
  120. </div>
  121. </li>
  122. <li class="todo-wrap fifteen">
  123. <div class="todo-content">
  124. <h4 class="todo-name">
  125. ALIZARIN
  126. </h4>
  127. #E74C3C
  128. </div>
  129. </li>
  130. <li class="todo-wrap sixteen">
  131. <div class="todo-content">
  132. <h4 class="todo-name">
  133. POMEGRANATE
  134. </h4>
  135. #C0392B
  136. </div>
  137. </li>
  138. <li class="todo-wrap seventeen clouds">
  139. <div class="todo-content">
  140. <h4 class="todo-name clouds">
  141. CLOUDS
  142. </h4>
  143. #ECF0F1
  144. </div>
  145. </li>
  146. <li class="todo-wrap eighteen">
  147. <div class="todo-content">
  148. <h4 class="todo-name">
  149. SILVER
  150. </h4>
  151. #BDC3C7
  152. </div>
  153. </li>
  154. <li class="todo-wrap nineteen">
  155. <div class="todo-content">
  156. <h4 class="todo-name">
  157. CONCRETE
  158. </h4>
  159. #95A5A6
  160. </div>
  161. </li>
  162. <li class="todo-wrap twenty">
  163. <div class="todo-content">
  164. <h4 class="todo-name">
  165. ASBESTOS
  166. </h4>
  167. #7F8C8D
  168. </div>
  169. </li>
  170. </ul>
  171. </div>
  172. </div>

2. Now, add the necessary styles to your project by copying the following CSS code. This code includes styles for the color palette’s layout, headers, and individual color blocks.

  1. @import url(https://fonts.googleapis.com/css?family=Lato:700);
  2.  
  3. body {
  4. color: #34495e;
  5. font: 14px/1.231 "Lato", sans-serif; }
  6.  
  7. h3 {
  8. font-size: 19px;
  9. font-weight: 700;
  10. line-height: 23px;
  11. margin: 0;
  12. padding: 10px 0;
  13. text-rendering: optimizelegibility;}
  14.  
  15. h4 {
  16. font-size: 18px;
  17. font-weight: 500;
  18. margin-top: 4px;
  19. line-height: 20px;
  20. text-rendering: optimizelegibility;}
  21.  
  22. .span4 {
  23. width: 250px; }
  24.  
  25. [class*="span"] {
  26. float: left;
  27. min-height: 1px;
  28. margin-left: 20px; }
  29.  
  30. .mrm, .mhm, .mam {
  31. margin-right: 10px; }
  32.  
  33. .todo {
  34. background-color: #2c3e50;
  35. border-radius: 8px 8px 6px 6px;
  36. color: #fff;
  37. margin-bottom: 20px; }
  38.  
  39. .todo-header {
  40. background: #1ABC9C 92% center no-repeat;
  41. background-size: 16px 16px;
  42. border-radius: 6px 6px 0 0;
  43. color: #34495e;
  44. padding: 10px 20px; }
  45.  
  46. .todo ul {
  47. margin: 0;
  48. list-style-type: none;
  49. padding: 0;
  50. display: block; }
  51.  
  52. .todo-name {
  53. color: #FFF;
  54. font-size: 17px;
  55. margin: 1px 0 3px; }
  56.  
  57. .todo-name.clouds {
  58. color: #BDC3C7; }
  59.  
  60. .todo li.todo-done {
  61. background: transparent 92% center no-repeat;
  62. background-size: 20px 20px;
  63. color: #1abc9c; }
  64.  
  65. .todo li:first-child {
  66. margin-top: 0; }
  67.  
  68. .todo li:last-child {
  69. border-radius: 0 0 6px 6px;
  70. padding-bottom: 18px; }
  71.  
  72. .todo-wrap {
  73. background-size: 20px 20px;
  74. cursor: pointer;
  75. padding: 10px 18px;
  76. position: relative;
  77. -webkit-transition: 0.25s;
  78. -moz-transition: 0.25s;
  79. -o-transition: 0.25s;
  80. transition: 0.25s;
  81. -webkit-backface-visibility: hidden; }
  82.  
  83. .one {
  84. background: #16A085; }
  85.  
  86. .two {
  87. background: #2ECC71; }
  88.  
  89. .three {
  90. background: #27AE60; }
  91.  
  92. .four {
  93. background: #3498DB; }
  94.  
  95. .five {
  96. background: #2980B9; }
  97.  
  98. .six {
  99. background: #9B59B6; }
  100.  
  101. .seven {
  102. background: #8E44AD; }
  103.  
  104. .eight {
  105. background: #34495E; }
  106.  
  107. .nine {
  108. background: #2C3E50; }
  109.  
  110. .ten {
  111. background: #22313f; }
  112.  
  113. .elleven {
  114. background: #F1C40F; }
  115.  
  116. .twelve {
  117. background: #F39C12; }
  118.  
  119. .thirteen {
  120. background: #E67E22; }
  121.  
  122. .fourteen {
  123. background: #D35400; }
  124.  
  125. .fifteen {
  126. background: #E74C3C; }
  127.  
  128. .sixteen {
  129. background: #C0392B; }
  130.  
  131. .seventeen {
  132. background: #ECF0F1; }
  133.  
  134. .seventeen.clouds {
  135. color: #BDC3C7; }
  136.  
  137. .eighteen {
  138. background: #BDC3C7; }
  139.  
  140. .nineteen {
  141. background: #95A5A6; }
  142.  
  143. .twenty {
  144. background: #7F8C8D; }

Modify the color names, hex codes, or styling properties to suit your project’s requirements. Each color block is represented by a <li> element with a unique class (e.g., one, two). Adjust the content inside these blocks to change color names and hex codes.

Furthermore, you can integrate the flat colors into your project by referencing the appropriate class within your HTML elements. For instance, apply the color represented by the class one to a specific element.

That’s all! hopefully, you have successfully created an HTML5 Flat Design Color Palette. If you have any questions or suggestions, feel free to comment below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About CodeHim

Free Web Design Code & Scripts - CodeHim is one of the BEST developer websites that provide web designers and developers with a simple way to preview and download a variety of free code & scripts. All codes published on CodeHim are open source, distributed under OSD-compliant license which grants all the rights to use, study, change and share the software in modified and unmodified form. Before publishing, we test and review each code snippet to avoid errors, but we cannot warrant the full correctness of all content. All trademarks, trade names, logos, and icons are the property of their respective owners... find out more...

Please Rel0ad/PressF5 this page if you can't click the download/preview link

X