|
@@ -0,0 +1,123 @@
|
|
|
+<?php
|
|
|
+/* Custom Colors: Brompton */
|
|
|
+
|
|
|
+// Background Color
|
|
|
+// $config-global--color-background-default
|
|
|
+add_color_rule( 'bg', 'white', array(
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '', 'background-color' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `link` (primary)
|
|
|
+ array( '', 'color', 'link' ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `link` (primary)
|
|
|
+ array( '.has-primary-background-color[class]', 'color', 'link' ),
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `fg1` (secondary)
|
|
|
+ array( '.has-secondary-background-color[class]', 'color', 'fg1' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `txt` (foreground)
|
|
|
+ array( '.has-foreground-background-color[class],
|
|
|
+ .has-foreground-dark-background-color[class],
|
|
|
+ .has-foreground-light-background-color[class]', 'color', 'txt', 12 ),
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `txt` (background)
|
|
|
+ array( '.has-background-color[class],
|
|
|
+ .has-background-dark-color[class],
|
|
|
+ .has-background-light-color[class],
|
|
|
+ .has-background-background-color[class],
|
|
|
+ .has-background-dark-background-color[class],
|
|
|
+ .has-background-light-background-color[class]', 'color', 'bg', 12 ),
|
|
|
+ // Background-color
|
|
|
+ array( '.has-background-background-color[class]', 'background-color' ),
|
|
|
+ // Background-color darkened
|
|
|
+ array( '.has-background-dark-background-color[class]', 'background-color', '-1' ),
|
|
|
+ // Background-color lightened
|
|
|
+ array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
|
|
|
+
|
|
|
+), __( 'Background Color' ) );
|
|
|
+
|
|
|
+// Link Color
|
|
|
+// $config-global--color-primary-default
|
|
|
+add_color_rule( 'link', '#CA2017', array(
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '', 'background-color' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Border color left
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '', 'border-left-color', 'bg' ),
|
|
|
+
|
|
|
+ // Border color right
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '', 'border-right-color', 'bg' ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Background-color
|
|
|
+ array( '.has-primary-background-color[class]', 'background-color' ),
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.has-primary-color[class]', 'color', 'bg' ),
|
|
|
+
|
|
|
+), __( 'Link Color' ) );
|
|
|
+
|
|
|
+// Text Color
|
|
|
+// $config-global--color-foreground-default
|
|
|
+add_color_rule( 'txt', '#222222', array(
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` with more contrast
|
|
|
+ array( '', 'color', 'bg', 7 ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ // Needs contrast against `bg` with more contrast
|
|
|
+ array( '', 'background-color', 'bg', 7 ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Foreground
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.has-foreground-color[class]', 'color', 'bg' ),
|
|
|
+ array( '.has-foreground-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
+ // Text-color darkened
|
|
|
+ array( '.has-foreground-dark-color[class]', 'color', '-1' ),
|
|
|
+ // Background-color darkened
|
|
|
+ array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
|
|
|
+
|
|
|
+ // Text-color brightened
|
|
|
+ array( '.has-foreground-light-color[class]', 'color', '+2' ),
|
|
|
+ // Background-color brightened
|
|
|
+ array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
|
|
|
+
|
|
|
+), __( 'Text Color' ) );
|
|
|
+
|
|
|
+// Accent Color
|
|
|
+// $config-global--color-secondary-default
|
|
|
+add_color_rule( 'fg1', '#007FDB', array(
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.has-secondary-color[class]', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '.has-secondary-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
+), __( 'Secondary Color' ) );
|