Skip to content

Instantly share code, notes, and snippets.

@akdetrick
Created October 22, 2013 03:38
Show Gist options
  • Save akdetrick/7094844 to your computer and use it in GitHub Desktop.
Save akdetrick/7094844 to your computer and use it in GitHub Desktop.
cross-platform colors in yaml configuration file
# colors are listed as [r,g,b,a]
primitive:
comment: "PRIMITIVE COLORS - used in multiple color aliases, try not to use these directly"
colors:
red: &red [226,55,60,1]
blue: &blue [57,135,203,1]
primaryGray: &primaryGray [0,0,0,.8]
secondaryGray: &secondaryGray [0,0,0,.55]
tertiaryGray: &tertiaryGray [0,0,0,.25]
lineGray: &lineGray [0,0,0,.1]
primaryGrayInverted: &primaryGrayInverted [255,255,255,1]
secondaryGrayInverted: &secondaryGrayInverted [255,255,255,.8]
tertiaryGrayInverted: &tertiaryGrayInverted [255,255,255,.4]
lineGrayInverted: &lineGrayInverted [255,255,255,.2]
background:
comment: "BACKGROUNDS - these are always 100% opacity"
colors:
backgroundContent: [255,255,255,1]
backgroundCollection: [231,231,231,1]
backgroundNav: [247,247,247,1]
backgroundContentInverted: [44,62,80,1]
backgroundContentAccent: *red
default_context:
comment: "DEFAULT CONTEXT (content on light backgrounds)"
colors:
textPrimary: *primaryGray
textSecondary: *secondaryGray
textTertiary: *tertiaryGray
border: *lineGray
link: *blue
accent: *red
"yes": *red
"no": *secondaryGray
waitlist: *secondaryGray
buttonPrimary: *red
buttonSecondary: *tertiaryGray
buttonTertiaryBorder: *tertiaryGray
inverted_context:
comment: "INVERTED CONTEXT (content on dark backgrounds)"
colors:
textPrimaryInverted: *primaryGrayInverted
textSecondaryInverted: *secondaryGrayInverted
textTertiaryInverted: *tertiaryGrayInverted
borderInverted: *lineGrayInverted
linkInverted: *blue
accentInverted: *red
yesInverted: *red
noInverted: *secondaryGrayInverted
waitlistInverted: *secondaryGrayInverted
buttonPrimaryInverted: *red
buttonSecondaryInverted: *tertiaryGrayInverted
buttonTertiaryBorder: *tertiaryGrayInverted
misc:
comment: "MISC"
colors:
overlayPressed: [64,197,255,.2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment