Skip to content

Instantly share code, notes, and snippets.

@imsus
Created August 28, 2017 10:38
Show Gist options
  • Save imsus/45d108f3a0a973075fb45e319f27153c to your computer and use it in GitHub Desktop.
Save imsus/45d108f3a0a973075fb45e319f27153c to your computer and use it in GitHub Desktop.
Tachyons Integrations to Open Color
list = {
gray: #f8f9fa #f1f3f5 #e9ecef #dee2e6 #ced4da #adb5bd #868e96 #495057 #343a40 #212529
red: #fff5f5 #ffe3e3 #ffc9c9 #ffa8a8 #ff8787 #ff6b6b #fa5252 #f03e3e #e03131 #c92a2a
pink: #fff0f6 #ffdeeb #fcc2d7 #faa2c1 #f783ac #f06595 #e64980 #d6336c #c2255c #a61e4d
grape: #f8f0fc #f3d9fa #eebefa #e599f7 #da77f2 #cc5de8 #be4bdb #ae3ec9 #9c36b5 #862e9c
violet: #f3f0ff #e5dbff #d0bfff #b197fc #9775fa #845ef7 #7950f2 #7048e8 #6741d9 #5f3dc4
indigo: #edf2ff #dbe4ff #bac8ff #91a7ff #748ffc #5c7cfa #4c6ef5 #4263eb #3b5bdb #364fc7
blue: #e8f7ff #ccedff #a3daff #72c3fc #4dadf7 #329af0 #228ae6 #1c7cd6 #1b6ec2 #1862ab
cyan: #e3fafc #c5f6fa #99e9f2 #66d9e8 #3bc9db #22b8cf #15aabf #1098ad #0c8599 #0b7285
teal: #e6fcf5 #c3fae8 #96f2d7 #63e6be #38d9a9 #20c997 #12b886 #0ca678 #099268 #087f5b
green: #ebfbee #d3f9d8 #b2f2bb #8ce99a #69db7c #51cf66 #40c057 #37b24d #2f9e44 #2b8a3e
lime: #f4fce3 #e9fac8 #d8f5a2 #c0eb75 #a9e34b #94d82d #82c91e #74b816 #66a80f #5c940d
yellow: #fff9db #fff3bf #ffec99 #ffe066 #ffd43b #fcc419 #fab005 #f59f00 #f08c00 #e67700
orange: #fff4e6 #ffe8cc #ffd8a8 #ffc078 #ffa94d #ff922b #fd7e14 #f76707 #e8590c #d9480f
}
open-color(selector, index, color)
.oc-{selector}-{index}
color color
.bg-oc-{selector}-{index}
background-color color
.b--oc-{selector}-{index}
border-color color
.hover-oc-{selector}-{index}:hover,
.hover-oc-{selector}-{index}:focus
color color
.hover-bg-oc-{selector}-{index}:hover,
.hover-bg-oc-{selector}-{index}:focus
background-color color
for name, value in list
for color, index in value
open-color(name, index, color)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment