├── 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 |
--------------------------------------------------------------------------------
/colors/growth-blue-bg.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/metro-blue-bg.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/growth-blue-text.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/metro-blue-text.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/metro-dark-green-bg.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/terminal-green-bg.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/metro-dark-green-text.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/colors/terminal-green-text.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/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 |
$author.affiliation$
51 | $endfor$ 52 | 53 |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 |python generate.py ouput_file_name color_name color example:
56 |python generator.py 'metro-dark-green' 'Dark Green' '#1e7145'
57 | python generator.py 'metro-blue' 'Metro Blue' '#2d89ef'| Name | 63 |Value | 64 |BG Example | 65 |
|---|---|---|
| Metro Blue | 70 |||
| Dark Green | 75 |
MIT
82 | 83 | 84 | --------------------------------------------------------------------------------