colors.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. ---
  2. title: Colors
  3. layout: documentation
  4. doc-tab: overview
  5. doc-subtab: colors
  6. initial_colors:
  7. - name: "$black"
  8. value: hsl(0, 0%, 4%)
  9. - name: "$black-bis"
  10. value: hsl(0, 0%, 7%)
  11. - name: "$black-ter"
  12. value: hsl(0, 0%, 14%)
  13. - name: "$grey-darker"
  14. value: hsl(0, 0%, 21%)
  15. - name: "$grey-dark"
  16. value: hsl(0, 0%, 29%)
  17. - name: "$grey"
  18. value: hsl(0, 0%, 48%)
  19. - name: "$grey-light"
  20. value: hsl(0, 0%, 71%)
  21. - name: "$grey-lighter"
  22. value: hsl(0, 0%, 86%)
  23. - name: "$white-ter"
  24. value: hsl(0, 0%, 96%)
  25. - name: "$white-bis"
  26. value: hsl(0, 0%, 98%)
  27. - name: "$white"
  28. value: hsl(0, 0%, 100%)
  29. - name: "$orange"
  30. value: hsl(14, 100%, 53%)
  31. - name: "$yellow"
  32. value: hsl(48, 100%, 67%)
  33. - name: "$green"
  34. value: hsl(141, 71%, 48%)
  35. - name: "$turquoise"
  36. value: hsl(171, 100%, 41%)
  37. - name: "$blue"
  38. value: hsl(217, 71%, 53%)
  39. - name: "$purple"
  40. value: hsl(271, 100%, 71%)
  41. - name: "$red"
  42. value: hsl(348, 100%, 61%)
  43. colors:
  44. - id: "white"
  45. variable: "$white"
  46. value: "$white"
  47. value_hex: white
  48. invert: "$black"
  49. invert_hex: black
  50. - id: "black"
  51. variable: "$black"
  52. value: "$black"
  53. value_hex: black
  54. invert: "$white"
  55. invert_hex: white
  56. - id: "light"
  57. variable: "$light"
  58. value: "$white-ter"
  59. value_hex: white-ter
  60. invert: "$light-invert"
  61. invert_hex: black
  62. - id: "dark"
  63. variable: "$dark"
  64. value: "$grey-darker"
  65. value_hex: grey-darker
  66. invert: "$dark-invert"
  67. invert_hex: white
  68. - id: "primary"
  69. variable: "$primary"
  70. value: "$turquoise"
  71. value_hex: turquoise
  72. invert: "$primary-invert"
  73. invert_hex: white
  74. - id: "info"
  75. variable: "$info"
  76. value: "$blue"
  77. value_hex: blue
  78. invert: "$info-invert"
  79. invert_hex: white
  80. - id: "success"
  81. variable: "$success"
  82. value: "$green"
  83. value_hex: green
  84. invert: "$success-invert"
  85. invert_hex: white
  86. - id: "warning"
  87. variable: "$warning"
  88. value: "$yellow"
  89. value_hex: yellow
  90. invert: "$warning-invert"
  91. invert_hex: black
  92. - id: "danger"
  93. variable: "$danger"
  94. value: "$red"
  95. value_hex: red
  96. invert: "$danger-invert"
  97. invert_hex: white
  98. shades:
  99. - id: "black-bis"
  100. value: "$black-bis"
  101. - id: "black-ter"
  102. value: "$black-ter"
  103. - id: "grey-darker"
  104. value: "$grey-darker"
  105. - id: "grey-dark"
  106. value: "$grey-dark"
  107. - id: "grey"
  108. value: "$grey"
  109. - id: "grey-light"
  110. value: "$grey-light"
  111. - id: "grey-lighter"
  112. value: "$grey-lighter"
  113. - id: "white-ter"
  114. value: "$white-ter"
  115. - id: "white-bis"
  116. value: "$white-bis"
  117. ---
  118. {% include subnav-overview.html %}
  119. <section class="section">
  120. <div class="container">
  121. <h1 class="title">Colors</h1>
  122. <h2 class="subtitle">The <strong>colors</strong> that <strong>style</strong> most Bulma elements and components</h2>
  123. <hr>
  124. <div class="content">
  125. <p>
  126. Most elements and components have color variations thanks to <strong>modifiers</strong> with syntax <code>.is-$color</code>, like <code>is-primary</code> or <code>is-dark</code>.
  127. </p>
  128. <p>
  129. This is thanks to the <code>$colors</code> <strong>Sass map</strong>, through which Bulma cycles to grab all the colors and their inverts.
  130. </p>
  131. </div>
  132. <table class="table">
  133. <thead>
  134. <tr>
  135. <th>Color</th>
  136. <th>Variable</th>
  137. <th>Value</th>
  138. <th>Actual value</th>
  139. <th>Invert variable</th>
  140. <th>Actual invert value</th>
  141. </tr>
  142. </thead>
  143. <tbody>
  144. {% for color in page.colors %}
  145. {% assign includePath = color.value_hex | prepend: "color/" | append: ".html" %}
  146. <tr>
  147. <td>
  148. <strong>{{ color.id | capitalize }}</strong>
  149. </td>
  150. <td>
  151. <code>{{ color.variable }}</code>
  152. </td>
  153. <td>
  154. <code>{{ color.value }}</code>
  155. </td>
  156. <td>
  157. {% include {{ includePath }} %}
  158. </td>
  159. <td>
  160. <code>{{ color.invert }}</code>
  161. </td>
  162. <td>
  163. {% if color.invert_hex == "black" %}
  164. <span class="bd-color" style="background: rgba(0, 0, 0, 0.7);"></span>
  165. <code>rgba(0, 0, 0, 0.7)</code>
  166. {% else %}
  167. <span class="bd-color" style="background: #fff;"></span>
  168. <code>#fff</code>
  169. {% endif %}
  170. </td>
  171. </tr>
  172. {% endfor %}
  173. </tbody>
  174. </table>
  175. </div>
  176. </section>