├── pipfile ├── templates ├── .gitkeep └── html.template ├── Makefile ├── colors ├── blue-dark-bg.svg ├── blue-dark-text.svg ├── growth-blue-bg.svg ├── metro-blue-bg.svg ├── growth-blue-text.svg ├── metro-blue-text.svg ├── metro-dark-green-bg.svg ├── terminal-green-bg.svg ├── metro-dark-green-text.svg └── terminal-green-text.svg ├── generator.py ├── .gitignore ├── README.md └── index.html /pipfile: -------------------------------------------------------------------------------- 1 | svgwrite -------------------------------------------------------------------------------- /templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | index: 2 | pandoc README.md --template=templates/html.template -o index.html 3 | -------------------------------------------------------------------------------- /colors/blue-dark-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /colors/blue-dark-text.svg: -------------------------------------------------------------------------------- 1 | 2 | Blue Dark:#50616D -------------------------------------------------------------------------------- /colors/growth-blue-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /colors/metro-blue-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /colors/growth-blue-text.svg: -------------------------------------------------------------------------------- 1 | 2 | Growth Blue:#179ED6 -------------------------------------------------------------------------------- /colors/metro-blue-text.svg: -------------------------------------------------------------------------------- 1 | 2 | Metro Blue:#2d89ef -------------------------------------------------------------------------------- /colors/metro-dark-green-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /colors/terminal-green-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /colors/metro-dark-green-text.svg: -------------------------------------------------------------------------------- 1 | 2 | Dark Green:#1e7145 -------------------------------------------------------------------------------- /colors/terminal-green-text.svg: -------------------------------------------------------------------------------- 1 | 2 | Terminal Green:#30ea30 -------------------------------------------------------------------------------- /generator.py: -------------------------------------------------------------------------------- 1 | import svgwrite 2 | import sys 3 | 4 | 5 | def draw_text(file_name, color_name, color): 6 | dwg = svgwrite.Drawing('colors/' + file_name + '-text.svg', size=(u'180', u'30')) 7 | dwg.add(dwg.text(color_name + ':' + color, insert=(10, 20), fill=color)) 8 | dwg.save() 9 | 10 | 11 | def draw_bg(file_name, color): 12 | dwg = svgwrite.Drawing('colors/' + file_name + '-bg.svg', size=(u'180', u'60')) 13 | dwg.add(dwg.rect((0, 0), (180, 60), fill=color)) 14 | dwg.save() 15 | 16 | 17 | if __name__ == '__main__': 18 | file_name = sys.argv[1] 19 | color_name = sys.argv[2] 20 | color = sys.argv[3] 21 | 22 | draw_text(file_name=file_name, color_name=color_name, color=color) 23 | draw_bg(file_name=file_name, color=color) 24 | 25 | print('---------------------Markdown---------------------') 26 | print(color_name + ' ' 27 | ' | ' 28 | ' ' 29 | ' | ' 30 | '' 31 | ' | ' 32 | + color) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Python template 2 | # Byte-compiled / optimized / DLL files 3 | __pycache__/ 4 | *.py[cod] 5 | *$py.class 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *,cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask instance folder 58 | instance/ 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | 91 | # Created by .ignore support plugin (hsz.mobi) 92 | -------------------------------------------------------------------------------- /templates/html.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $for(author-meta)$ 7 | 8 | $endfor$ 9 | $if(date-meta)$ 10 | 11 | $endif$ 12 | $if(title-prefix)$$title-prefix$ - $endif$$pagetitle$ 13 | 14 | 17 | $if(quotes)$ 18 | 19 | $endif$ 20 | $if(highlighting-css)$ 21 | 24 | $endif$ 25 | $for(css)$ 26 | 27 | $endfor$ 28 | $if(math)$ 29 | $math$ 30 | $endif$ 31 | $for(header-includes)$ 32 | $header-includes$ 33 | $endfor$ 34 | 35 | 36 | $for(include-before)$ 37 | $include-before$ 38 | $endfor$ 39 | $if(title)$ 40 |
41 | $if(date)$ 42 |

$date$

43 | $endif$ 44 | 45 |

$title$

46 | 47 | 48 | $for(author)$ 49 |

$author.name$

50 |

$author.affiliation$

51 | $endfor$ 52 | 53 |
54 | $endif$ 55 | $if(toc)$ 56 | 59 | $endif$ 60 | 61 | $if(abstract)$ 62 | 63 |

Abstract: $abstract$

64 | 65 | $endif$ 66 | 67 | 68 | $body$ 69 | 70 | 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Colors: A Collection of Phodal's usage in design 2 | 3 | ```bash 4 | python generate.py ouput_file_name color_name color 5 | ``` 6 | 7 | example: 8 | 9 | ```bash 10 | python generator.py 'metro-dark-green' 'Dark Green' '#1e7145' 11 | python generator.py 'metro-blue' 'Metro Blue' '#2d89ef' 12 | ``` 13 | 14 | Make Index Page 15 | 16 | ```bash 17 | make index 18 | ``` 19 | 20 | Colors 21 | ------ 22 | 23 | Name | Value | BG Example | Value for Copy 24 | --------------|----------------------------------------------------------|----------------------|--------------- 25 | Metro Blue | | | #2d89ef 26 | Dark Green | | | #1e7145 27 | Terminal Green | | | #30ea30 28 | Blue Dark | | | #50616D 29 | Growth Blue | | | #179ED6 30 | 31 | Refs 32 | --- 33 | 34 | - http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html 35 | 36 | License 37 | --- 38 | 39 | [![Phodal's Idea](http://brand.phodal.com/shields/idea-small.svg)](http://ideas.phodal.com/) 40 | 41 | © 2016 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas). This code is distributed under the MIT license. See `LICENSE` in this directory. 42 | 43 | [待我代码编成,娶你为妻可好](http://www.xuntayizhan.com/blog/ji-ke-ai-qing-zhi-er-shi-dai-wo-dai-ma-bian-cheng-qu-ni-wei-qi-ke-hao-wan/) 44 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 48 | 49 | 50 | 51 | 52 | 53 |

Colors: A Collection of Phodal's usage in design

54 |
python generate.py ouput_file_name color_name color 
55 |

example:

56 |
python generator.py 'metro-dark-green' 'Dark Green' '#1e7145'
57 | python generator.py 'metro-blue' 'Metro Blue' '#2d89ef'
58 |

Colors

59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
NameValueBG Example
Metro Blue
Dark Green
80 |

LICENSE

81 |

MIT

82 | 83 | 84 | --------------------------------------------------------------------------------