├── LICENSE ├── README.md ├── index.js ├── package-lock.json └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 MozzarellaM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hyper-theme-monokai-pro 2 | 3 | [![npm version](https://badge.fury.io/js/hyper-monokai-pro.svg)](https://www.npmjs.com/package/hyper-monokai-pro) 4 | 5 | A theme for [Hyper](https://github.com/zeit/hyper), inspired by [Monokai Pro](https://monokai.pro/) theme for VS Code and Sublime Text. 6 | 7 | ![Monokai Pro Theme](/../screenshots/pro.png?raw=true) 8 | 9 | ## Installation 10 | 11 | Add `"hyper-monokai-pro"` to the beginning of `plugins` in `~/.hyper.js`. 12 | 13 | ### Compatibility note 14 | 15 | If you are using another extension like `hyper-tabs-enhanced` which modifies Hyper's CSS, you should place this theme **before** those extensions, otherwise it will use colors based on the pre-existing theme, rather than this one. 16 | 17 | ## Configuration 18 | 19 | There are several themes included in this plugin. 20 | 21 | * `pro` – Monokai Pro *(default)* 22 | * `octagon` – Monokai Pro (Filter Octagon) 23 | * `machine` – Monokai Pro (Filter Machine) 24 | * `ristretto` – Monokai Pro (Filter Machine) 25 | * `spectrum` – Monokai Pro (Filter Machine) 26 | * `classic` – Monokai Classic 27 | 28 | To switch between them, add the following property to your `~/hyper.js` file 29 | 30 | ```js 31 | module.exports = { 32 | config: { 33 | ... 34 | hyperMonokaiPro: { 35 | // theme: "pro" || "octagon" || "machine" || "ristretto" || "spectrum" || "classic" 36 | theme: "octagon" 37 | }, 38 | ... 39 | } 40 | } 41 | ``` 42 | 43 | ## Screenshots 44 | 45 | ![Monokai Octagon Theme](/../screenshots/octagon.png?raw=true) 46 | 47 | ![Monokai Ristretto Theme](/../screenshots/ristretto.png?raw=true) 48 | 49 | ![Monokai Spectrum Theme](/../screenshots/spectrum.png?raw=true) 50 | 51 | ![Monokai Machine Theme](/../screenshots/machine.png?raw=true) 52 | 53 | ![Monokai Classic Theme](/../screenshots/classic.png?raw=true) 54 | 55 | ## Credit 56 | 57 | This plugin is a port of color schemes contained in the Monokai Pro theme for VSCode. Monokai Pro is a commercial product created by [Wimer Hazenberg](https://github.com/Monokai), with whom this project is entirely unaffiliated. 58 | 59 | I encourage you to support his work by purchasing a license. 60 | 61 | ## License 62 | 63 | MIT © MozzarellaM 64 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var Color = require('color'); 2 | 3 | // Theme format: [ 4 | // black, red, green, yellow, blue, magenta, cyan, white 5 | // ] 6 | 7 | const THEMES = { 8 | "classic": ["#1D1E19", "#F82570", "#A6E12D", "#E4DB73", "#FC961F", "#AE81FF", "#66D9EE", "#FDFFF1"], 9 | "pro": ["#221F22", "#FF6188", "#A9DC76", "#FFD866", "#FC9867", "#AB9DF2", "#78DCE8", "#FCFCFA"], 10 | "octagon": ["#1E1F2B", "#FF657A", "#BAD761", "#FFD76D", "#FF9B5E", "#C39AC9", "#9CD1BB", "#EAF2F1"], 11 | "machine": ["#1D2528", "#FF6D7E", "#A2E57B", "#FFED72", "#FFB270", "#BAA0F8", "#7CD5F1", "#F2FFFC"], 12 | "ristretto": ["#211C1C", "#FD6883", "#ADDA78", "#F9CC6C", "#F38D70", "#A8A9EB", "#85DACC", "#FFF1F3"], 13 | "spectrum": ["#211C1C", "#FC618D", "#7BD88F", "#FCE566", "#FD9353", "#948AE3", "#5AD4E6", "#F7F1FF"] 14 | }; 15 | 16 | exports.decorateConfig = (config) => { 17 | const settings = config.hyperMonokaiPro || {}; 18 | const theme = THEMES[settings.theme || "pro"] || THEMES["pro"]; 19 | 20 | const colors = [ 21 | ...theme.slice(0, 8).map(c => Color(c).darken(0.05).hex()), 22 | ...theme.slice(0, 8) 23 | ]; 24 | 25 | const backgroundColor = colors[0]; // black 26 | const foregroundColor = colors[7]; // white 27 | // Generate other Colors 28 | return {...config, 29 | colors, 30 | backgroundColor, 31 | foregroundColor, 32 | cursorColor: Color(foregroundColor).fade(0.5).rgb().string(), 33 | borderColor: Color(backgroundColor).darken(0.1).rgb().string(), 34 | selectionColor: Color(colors[6]).fade(0.7).rgb().string(), 35 | cursorAccentColor: Color(backgroundColor).rgb().string(), 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hyper-monokai-pro", 3 | "version": "0.2.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "color": { 8 | "version": "3.1.2", 9 | "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", 10 | "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", 11 | "requires": { 12 | "color-convert": "^1.9.1", 13 | "color-string": "^1.5.2" 14 | } 15 | }, 16 | "color-convert": { 17 | "version": "1.9.3", 18 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 19 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 20 | "requires": { 21 | "color-name": "1.1.3" 22 | } 23 | }, 24 | "color-name": { 25 | "version": "1.1.3", 26 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 27 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 28 | }, 29 | "color-string": { 30 | "version": "1.5.3", 31 | "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", 32 | "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", 33 | "requires": { 34 | "color-name": "^1.0.0", 35 | "simple-swizzle": "^0.2.2" 36 | } 37 | }, 38 | "is-arrayish": { 39 | "version": "0.3.2", 40 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", 41 | "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" 42 | }, 43 | "simple-swizzle": { 44 | "version": "0.2.2", 45 | "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", 46 | "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", 47 | "requires": { 48 | "is-arrayish": "^0.3.1" 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hyper-monokai-pro", 3 | "version": "0.4.0", 4 | "description": "A theme for Hyper inspired by Monokai Pro", 5 | "files": [ 6 | "index.js" 7 | ], 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/MozzarellaM/hyper-monokai-pro.git" 11 | }, 12 | "keywords": [ 13 | "hyper", 14 | "hyper-theme" 15 | ], 16 | "author": "MozzarellaM", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/MozzarellaM/hyper-monokai-pro/issues" 20 | }, 21 | "homepage": "https://github.com/MozzarellaM/hyper-monokai-pro#readme", 22 | "dependencies": { 23 | "color": "^3.1.2" 24 | } 25 | } 26 | --------------------------------------------------------------------------------