Skip to content

Instantly share code, notes, and snippets.

View carsonjones's full-sized avatar
😁

Carson carsonjones

😁
View GitHub Profile
@carsonjones
carsonjones / figmaColorExport.js
Created May 12, 2020 17:12
Export colors from Figma Document
function rgbToHex({ r = 0, g = 0, b = 0 }) {
return `#${ratioToHex(r)}${ratioToHex(g)}${ratioToHex(b)}`;
}
function ratioToHex(ratio) {
const hex = Math.round(ratio * 255).toString(16).toUpperCase();
return `${hex.length === 1 ? '0' : ''}${hex}`;
}
const figmaStyles = figma.getLocalPaintStyles();
const result = figmaStyles.map((ps, i) => {
return {
@carsonjones
carsonjones / nova.tmTheme
Created October 20, 2016 14:31
Nova Colors - Sublime - TmTheme File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Nova</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@carsonjones
carsonjones / carson.zsh-theme
Created March 10, 2016 16:50
My ZSH theme, with Emojis (variation of ys.zsh-theme)
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
# Mar 2013 ys
# Machine name.
function box_name {