Last active
May 11, 2016 05:06
-
-
Save rileyjshaw/3961b38a0ebb831945b9e886b03239f2 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
<?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>author</key> | |
<string>rileyjshaw (http://rileyjshaw.com)</string> | |
<key>colorSpaceName</key> | |
<string>sRGB</string> | |
<key>gutterSettings</key> | |
<dict> | |
<key>background</key> | |
<string>#a8b3b8</string> | |
<key>divider</key> | |
<string>#aab0b6</string> | |
<key>foreground</key> | |
<string>#acb1b4</string> | |
<key>selectionBackground</key> | |
<string>#abb0b5</string> | |
<key>selectionForeground</key> | |
<string>#abaeb5</string> | |
</dict> | |
<key>name</key> | |
<string>Oceanic Next</string> | |
<key>semanticClass</key> | |
<string>oceanic.next.dark</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#263238</string> | |
<key>caret</key> | |
<string>#FFCC00</string> | |
<key>foreground</key> | |
<string>#A8B8B8</string> | |
<key>invisibles</key> | |
<string>#65737e</string> | |
<key>lineHighlight</key> | |
<string>#00000030</string> | |
<key>selection</key> | |
<string>#80CBC420</string> | |
<key>guide</key> | |
<string>#37474F80</string> | |
<key>activeGuide</key> | |
<string>#80CBC470</string> | |
<key>stackGuide</key> | |
<string>#37474Fff</string> | |
<key>gutterForeground</key> | |
<string>#37474F</string> | |
<key>findHighlight</key> | |
<string>#F8E71C</string> | |
<key>tagsOptions</key> | |
<string>underline</string> | |
<key>shadow</key> | |
<string>#00000010</string> | |
<key>selectionBorder</key> | |
<string>#516B79</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Comments</string> | |
<key>scope</key> | |
<string>comment, punctuation.definition.comment</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bbff99</string> | |
<key>fontStyle</key> | |
<string>bold</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Variable</string> | |
<key>scope</key> | |
<string>variable</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a8aeb8</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Keyword, Storage</string> | |
<key>scope</key> | |
<string>keyword, storage.type, storage.modifier</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bca4bc</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Operator, Misc</string> | |
<key>scope</key> | |
<string>keyword.operator, constant.other.color, punctuation, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a2bebe</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Tag</string> | |
<key>scope</key> | |
<string>entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#cf9196</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Function, Special Method, Block Level</string> | |
<key>scope</key> | |
<string>entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method, meta.block-level</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#9cb0c4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Other Variable, String Link</string> | |
<key>scope</key> | |
<string>support.other.variable, string.other.link</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d18f91</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Number, Constant, Function Argument, Tag Attribute, Embedded</string> | |
<key>scope</key> | |
<string>constant.numeric, constant.language, support.constant, constant.character, variable.parameter, keyword.other.unit</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d5a68b</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>String, Symbols, Inherited Class, Markup Heading</string> | |
<key>scope</key> | |
<string>string, constant.other.symbol, constant.other.key, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js</string> | |
<key>settings</key> | |
<dict> | |
<key>fontStyle</key> | |
<string>normal</string> | |
<key>foreground</key> | |
<string>#a6bca4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Class, Support</string> | |
<key>scope</key> | |
<string>entity.name.class, entity.name.type.class, support.type, support.class, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d5bd8b</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Sub-methods</string> | |
<key>scope</key> | |
<string>entity.name.module.js, variable.import.parameter.js, variable.other.class.js</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#cf9194</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Language methods</string> | |
<key>scope</key> | |
<string>variable.language</string> | |
<key>settings</key> | |
<dict> | |
<key>fontStyle</key> | |
<string>italic</string> | |
<key>foreground</key> | |
<string>#cf9194</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>entity.name.method.js</string> | |
<key>scope</key> | |
<string>entity.name.method.js</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a5adbb</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>meta.method.js</string> | |
<key>scope</key> | |
<string>meta.class-method.js entity.name.function.js, variable.function.constructor</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a5adbb</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Attributes</string> | |
<key>scope</key> | |
<string>entity.other.attribute-name</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bca4b9</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Inserted</string> | |
<key>scope</key> | |
<string>markup.inserted</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a6bca4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#cf9194</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Changed</string> | |
<key>scope</key> | |
<string>markup.changed</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bca4b9</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Regular Expressions</string> | |
<key>scope</key> | |
<string>string.regexp</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a2bebe</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Escape Characters</string> | |
<key>scope</key> | |
<string>constant.character.escape</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a2bebe</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>URL</string> | |
<key>scope</key> | |
<string>*url*, *link*, *uri*</string> | |
<key>settings</key> | |
<dict> | |
<key>fontStyle</key> | |
<string>underline</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Search Results Nums</string> | |
<key>scope</key> | |
<string>constant.numeric.line-number.find-in-files - match</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bbaba5</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Search Results Lines</string> | |
<key>scope</key> | |
<string>entity.name.filename.find-in-files</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a6bca4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Decorators</string> | |
<key>scope</key> | |
<string>tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js</string> | |
<key>settings</key> | |
<dict> | |
<key>fontStyle</key> | |
<string>italic</string> | |
<key>foreground</key> | |
<string>#9cb0c4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>ES7 Bind Operator</string> | |
<key>scope</key> | |
<string>source.js constant.other.object.key.js string.unquoted.label.js</string> | |
<key>settings</key> | |
<dict> | |
<key>fontStyle</key> | |
<string>italic</string> | |
<key>foreground</key> | |
<string>#cf9194</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 8</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d5bd8b</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 7</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bca4bc</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 6</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#a5adbb</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 5</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#9cb0c4</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 4</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bbaba5</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 3</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#cf9194</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 2</string> | |
<key>scope</key> | |
<string>source.json meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d5a68b</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 1</string> | |
<key>scope</key> | |
<string>source.json meta meta.structure.dictionary.json string.quoted.double.json - meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta.structure.dictionary.json punctuation.definition.string - meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#d5bd8b</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>JSON key - Level 0</string> | |
<key>scope</key> | |
<string>source.json meta.structure.dictionary.json string.quoted.double.json - meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json punctuation.definition.string - meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#bca4bc</string> | |
</dict> | |
</dict> | |
</array> | |
<key>uuid</key> | |
<string>21a3a5f5-e82f-48a8-bc8b-9aef307f6131</string> | |
</dict> | |
</plist> |
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
<?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>author</key> | |
<string>rileyjshaw (http://rileyjshaw.com)</string> | |
<key>colorSpaceName</key> | |
<string>sRGB</string> | |
<key>gutterSettings</key> | |
<dict> | |
<key>background</key> | |
<string>#263238</string> | |
<key>divider</key> | |
<string>#343d46</string> | |
<key>foreground</key> | |
<string>#65737e</string> | |
<key>selectionBackground</key> | |
<string>#4f5b66</string> | |
<key>selectionForeground</key> | |
<string>#a7adba</string> | |
</dict> | |
<key>name</key> | |
<string>Literate</string> | |
<key>semanticClass</key> | |
<string>literate</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#263238</string> | |
<key>caret</key> | |
<string>#FFCC00</string> | |
<key>foreground</key> | |
<string>#A8B8B8</string> | |
<key>invisibles</key> | |
<string>#65737e</string> | |
<key>lineHighlight</key> | |
<string>#00000030</string> | |
<key>selection</key> | |
<string>#80CBC420</string> | |
<key>guide</key> | |
<string>#37474F80</string> | |
<key>activeGuide</key> | |
<string>#80CBC470</string> | |
<key>stackGuide</key> | |
<string>#37474Fff</string> | |
<key>gutterForeground</key> | |
<string>#37474F</string> | |
<key>findHighlight</key> | |
<string>#F8E71C</string> | |
<key>tagsOptions</key> | |
<string>underline</string> | |
<key>shadow</key> | |
<string>#00000010</string> | |
<key>selectionBorder</key> | |
<string>#516B79</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Comments</string> | |
<key>scope</key> | |
<string>comment, punctuation.definition.comment</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#BBFF99</string> | |
<key>fontStyle</key> | |
<string>bold</string> | |
</dict> | |
</dict> | |
</array> | |
<key>uuid</key> | |
<string>21a3a5f5-e82f-48a8-bc8b-9aef307f6131</string> | |
</dict> | |
</plist> |
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
/** | |
* Takes a color that's meant to stand out against your editor's background and | |
* makes it shy. | |
* | |
* Usage: | |
* | |
* toMuted('#aabbcc'); // Returns '#a6b0ba'. | |
*/ | |
// HEY THERE: Change this to your editor's <foreground> value. | |
var FG = '#a8b8b8'; | |
/** | |
* Main export :) | |
* | |
* @param {string} fg Your hand-picked muted `foreground` value. | |
* @return {function} Curry. Mmm... | |
*/ | |
var toMuted = (function (fg) { | |
// Extract `fg`'s "lightness". We'll set the lightness of all returned | |
// colors to this. | |
var _rgb = normalize(fg); | |
var l = (Math.max.apply(Math, _rgb) + Math.min.apply(Math, _rgb)) / 2; | |
/** | |
* Exposed function. | |
* | |
* Takes an input color, matches its lightness to `FG`, and reduces its | |
* saturation. Maintains hue. | |
* | |
* @param {string} hex Original color in the form #aabbcc. | |
* @return {string} "Muted" (desaturated/dark) color in the form | |
* #aabbcc. | |
*/ | |
return function toMuted (hex) { | |
// Reduce the original saturation but keep hue unchanged. | |
var _hs = toHueAndSaturation.apply(null, normalize(hex)); | |
var h = _hs[0]; | |
var s = _hs[1] / 2; | |
return toHex(h, s, l); | |
}; | |
////////////////////////////////////// | |
// Util functions from here on out: // | |
////////////////////////////////////// | |
/** | |
* Normalizes a 6-digit hex string. | |
* | |
* @param {string} hex Hex string in the form #aabbcc. | |
* @return {float[]} Array containing RGB components. Range: [0, 1]. | |
*/ | |
function normalize (hex) { | |
return /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ | |
.exec(hex) | |
.slice(1) | |
.map(function (n) {return parseInt(n, 16) / 255;}) | |
; | |
} | |
/** | |
* Extract the hue and saturation from an array of normalized RGB values. | |
* | |
* @param {float} r Range: [0, 1]. | |
* @param {float} g Range: [0, 1]. | |
* @param {float} b Range: [0, 1]. | |
* @return {float[]} Hue and saturation values. Range: [0, 1]. | |
*/ | |
function toHueAndSaturation (r, g, b) { | |
var max = Math.max(r, g, b), min = Math.min(r, g, b); | |
var diff = max - min; | |
// Exit early if achromatic. | |
if (!diff) {return [0, 0];} | |
var hue, saturation = diff / (1 - Math.abs(max + min - 1)); | |
switch (max){ | |
case r: hue = (g - b) / diff + (g < b ? 6 : 0); | |
break; | |
case g: hue = (b - r) / diff + 2; | |
break; | |
case b: hue = (r - g) / diff + 4; | |
break; | |
} | |
return [hue / 6, saturation]; | |
} | |
/** | |
* Transforms normalized HSL color components into a CSS hex string. | |
* Mostly dark magic. | |
* | |
* @param {float} h Range: [0, 1]. | |
* @param {float} s Range: [0, 1]. | |
* @param {float} l Range: [0, 1]. | |
* @return {string} Equivalent color in the form #aabbcc. | |
*/ | |
function toHex (h, s, l) { | |
function hueToRgb (p, q, t) { | |
if (t < 0) t += 1; | |
if (t > 1) t -= 1; | |
if (t < 1/6) return p + (q - p) * 6 * t; | |
if (t < 1/2) return q; | |
if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; | |
return p; | |
} | |
var q = l < 0.5 ? l * (1 + s) : l + s - l * s; | |
var p = 2 * l - q; | |
var r = hueToRgb(p, q, h + 1/3); | |
var g = hueToRgb(p, q, h); | |
var b = hueToRgb(p, q, h - 1/3); | |
return '#' + [r, g, b].map(function (n) { | |
return (Math.round(n * 255).toString(16) + 0).slice(0, 2); | |
}).join(''); | |
} | |
})(FG); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment