Created
January 25, 2018 22:54
-
-
Save rafaelrinaldi/1250b7dd5d704d84b50a7e103c3b0358 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { get as scale } from '../../utils'; | |
import { Colors } from './colors'; | |
import chroma from 'chroma-js'; | |
const darken = alpha => | |
chroma(Colors.BLACK) | |
.alpha(alpha) | |
.css(); | |
export const gray = scale({ | |
0: darken(0), | |
1: darken(0.25), | |
2: darken(0.5), | |
3: darken(0.75), | |
4: darken(1), | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Receives a hash map and returns a function that resolves a value given an id | |
export const get = map => id => map[id]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment