wpcom-colors.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?php
  2. /* Custom Colors: Libretto */
  3. // Main page background colour
  4. add_color_rule( 'bg', '#f2f1ed', array(
  5. array( 'body', 'background-color' ),
  6. ) );
  7. // Text colour
  8. add_color_rule( 'txt', '#363431', array(
  9. // Needs contrast against background colour
  10. array( 'body, button, input, select, textarea', 'color', 'bg' ),
  11. array( 'input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="url"]:focus, textarea:focus', 'color', 'bg' ),
  12. array( '.fn a', 'color', 'bg' ),
  13. array( '.comment-content', 'color', 'bg' ),
  14. // Needs contrast against post background colour
  15. array( '.libretto-long-form', 'color', '#faf9f5' ),
  16. array( 'input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="url"]:focus, textarea:focus', 'color', '#faf9f5' ),
  17. array( '#footer-sidebar, .widget-title, label', 'color', '#faf9f5', ),
  18. // No contrast
  19. array( 'input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="url"]:focus, textarea:focus', 'border-color' ),
  20. array( 'input[type="submit"]:active, button:active', 'background-color' ),
  21. array( 'input[type="submit"]:active, button:active', 'outline' ),
  22. array( '.menu-toggle', 'background-color' ),
  23. array( '.menu-toggle', 'border-color' ),
  24. array( '#site-navigation .sub-menu li', 'background-color' ),
  25. array( '#site-navigation .menu-item-has-children:hover:after ', 'border-bottom-color' ),
  26. array( '#site-navigation .sub-menu .menu-item-has-children:hover:after', 'border-right-color' ),
  27. ),
  28. __( 'Text' ) );
  29. // Accent colour--used for links
  30. add_color_rule( 'link', '#932817', array(
  31. // Needs contrast against main background colour
  32. array( 'a, a:visited, a:hover, a:active, a:focus', 'color', 'bg' ),
  33. array( '.site-title a:visited, .site-title a:hover, .site-title a:active, .site-title a:focus', 'color', 'bg' ),
  34. array( '.entry-footer a, .entry-footer a:visited, .entry-footer a:hover, .entry-footer a:active, .entry-footer a:focus', 'color', 'bg' ),
  35. // Needs contrast against post background colour, #faf9f5
  36. array( 'a, a:visited, a:hover, a:active, a:focus', 'color', '#faf9f5' ),
  37. array( '#infinite-handle span:hover', 'color', '#faf9f5' ),
  38. array( '.site-branding h1 a:visited, .site-branding h1 a:hover, .site-branding h1 a:active, .site-branding h1 a:focus', 'color', '#faf9f5' ),
  39. // No contrast
  40. array( '#infinite-handle span:hover', 'border-color' ),
  41. ),
  42. __( 'Accent', 'Color' ) );
  43. // Extra colour rules: Light grey
  44. add_color_rule( 'extra', '#d9d6d0', array(
  45. // Ensure the entry headers work against different background colours
  46. array( '.empty-header .title-block', 'border-color', 0.5 ),
  47. // Social nav links should have a background that lets the actual background through
  48. array( '#social a::before', 'background-color', 0.25 ),
  49. // ...and adjust this colour a bit for hovering purposes
  50. array( '#social a:hover::before', 'background-color', '-0.5' ),
  51. ) );
  52. // Extra colour rules: Another grey!
  53. add_color_rule( 'extra', '#787065', array(
  54. // Ensure that asides, nav, and footer have contrast against the background
  55. array( '.format-aside .entry-content', 'color', 'bg' ),
  56. array( '.previous .meta-nav, .next .meta-nav', 'color', 'bg' ),
  57. array( '.site-info, #colophon a, #colophon a:link, #colophon a:visited, #social a::before', 'color', 'bg' ),
  58. ) );
  59. // Extra colour rules: Blockquote before
  60. add_color_rule( 'extra', '#EBE7E1', array(
  61. // Give it some opacity so it works against the background!
  62. array( 'blockquote::before', 'color', 0.3 ),
  63. ) );
  64. // Extra colour rules: Medium grey
  65. add_color_rule( 'extra', '#a09a92', array(
  66. // Needs contrast against background
  67. array( '[class*="navigation"] .page-number', 'color', 'bg' ),
  68. array( 'input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], textarea, label', 'color', 'bg' ),
  69. array( '.site-branding h1', 'color', 'bg' ),
  70. array( '#colophon .site-info', 'color', 'bg' ),
  71. array( '[class*="navigation"] .previous a, [class*="navigation"] .next a', 'color', 'bg' ),
  72. array( '.entry-meta, .wp-caption-text', 'color', 'bg' ),
  73. array( '.says, .pingback', 'color', 'bg' ),
  74. // Contrast against post background
  75. array( '.entry-meta', 'color', '#faf9f5' ),
  76. array( 'h1, h2, h3, h4, h5, h6, blockquote, blockquote cite, thead th', 'color', '#faf9f5' ),
  77. ) );
  78. // Extra colour rules: White
  79. add_color_rule( 'extra', '#ffffff', array(
  80. // Need contrast against the 'txt' color
  81. array( '.mobile-site-title', 'color', 'txt' ),
  82. array( '#menu-icon span', 'background-color', 'txt' ),
  83. ) );
  84. // Colour palettes
  85. add_color_palette( array(
  86. '#2b2737',
  87. '#444349',
  88. '#c17292',
  89. '',
  90. '',
  91. ), 'Midnight Cherry' );
  92. add_color_palette( array(
  93. '#ffffff',
  94. '#3f4a54',
  95. '#6abbce',
  96. '',
  97. '',
  98. ), 'Snow' );
  99. add_color_palette( array(
  100. '#1a3155',
  101. '#45494f',
  102. '#d19a41',
  103. '',
  104. '',
  105. ), 'Captain' );
  106. add_color_palette( array(
  107. '#cec0c8',
  108. '#473f47',
  109. '#3f2856',
  110. '',
  111. '',
  112. ), 'Dust Jacket' );
  113. add_color_palette( array(
  114. '#33281b',
  115. '#44403c',
  116. '#66a2b2',
  117. '',
  118. '',
  119. ), 'Cowboy' );
  120. add_color_palette( array(
  121. '#838181',
  122. '#3b3b3f',
  123. '#a21d21',
  124. '',
  125. '',
  126. ), 'Tweed' );