dotcolors 1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dotcolors-1.0/.github/workflows/publish.yml +59 -0
- dotcolors-1.0/LICENSE +21 -0
- dotcolors-1.0/PKG-INFO +22 -0
- dotcolors-1.0/README.md +8 -0
- dotcolors-1.0/pyproject.toml +23 -0
- dotcolors-1.0/src/dotcolors/__init__.py +3 -0
- dotcolors-1.0/src/dotcolors/colors.json +150 -0
- dotcolors-1.0/src/dotcolors/colors.py +20 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Configure Git for SHA-256
|
|
15
|
+
run: |
|
|
16
|
+
git config --global init.defaultObjectFormat sha256
|
|
17
|
+
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.13"
|
|
26
|
+
|
|
27
|
+
- name: Install build dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install build
|
|
31
|
+
|
|
32
|
+
- name: Build package
|
|
33
|
+
run: python -m build
|
|
34
|
+
|
|
35
|
+
- name: Store distribution packages
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: python-package-distributions
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
publish:
|
|
42
|
+
name: Publish to PyPI
|
|
43
|
+
needs: build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
environment:
|
|
46
|
+
name: pypi
|
|
47
|
+
url: https://pypi.org/p/dotcolors
|
|
48
|
+
permissions:
|
|
49
|
+
id-token: write
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Download all the dists
|
|
53
|
+
uses: actions/download-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: python-package-distributions
|
|
56
|
+
path: dist/
|
|
57
|
+
|
|
58
|
+
- name: Publish distribution to PyPI
|
|
59
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
dotcolors-1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Suitne7
|
|
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.
|
dotcolors-1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: dotcolors
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Summary: An easy to use, dot-notation color library for Python
|
|
5
|
+
Project-URL: Homepage, https://github.com/Suitne7/dotcolors
|
|
6
|
+
Author: Suitne7
|
|
7
|
+
License: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# dotcolors
|
|
16
|
+
|
|
17
|
+
A lightweight, zero-dependency and zero-boilerplate color library that uses clean dot-notation. All colors are inherited from the W3C CSS color specification.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install dotcolors
|
dotcolors-1.0/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dotcolors"
|
|
7
|
+
version = "1.0"
|
|
8
|
+
description = "An easy to use, dot-notation color library for Python"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "Suitne7" }
|
|
12
|
+
]
|
|
13
|
+
license = { text = "MIT" }
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
requires-python = ">=3.8"
|
|
20
|
+
dependencies = []
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
Homepage = "https://github.com/Suitne7/dotcolors"
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aliceblue": "#f0f8ff",
|
|
3
|
+
"antiquewhite": "#faebd7",
|
|
4
|
+
"aqua": "#00ffff",
|
|
5
|
+
"aquamarine": "#7fffd4",
|
|
6
|
+
"azure": "#f0ffff",
|
|
7
|
+
"beige": "#f5f5dc",
|
|
8
|
+
"bisque": "#ffe4c4",
|
|
9
|
+
"black": "#000000",
|
|
10
|
+
"blanchedalmond": "#ffebcd",
|
|
11
|
+
"blue": "#0000ff",
|
|
12
|
+
"blueviolet": "#8a2be2",
|
|
13
|
+
"brown": "#a52a2a",
|
|
14
|
+
"burlywood": "#deb887",
|
|
15
|
+
"cadetblue": "#5f9ea0",
|
|
16
|
+
"chartreuse": "#7fff00",
|
|
17
|
+
"chocolate": "#d2691e",
|
|
18
|
+
"coral": "#ff7f50",
|
|
19
|
+
"cornflowerblue": "#6495ed",
|
|
20
|
+
"cornsilk": "#fff8dc",
|
|
21
|
+
"crimson": "#dc143c",
|
|
22
|
+
"cyan": "#00ffff",
|
|
23
|
+
"darkblue": "#00008b",
|
|
24
|
+
"darkcyan": "#008b8b",
|
|
25
|
+
"darkgoldenrod": "#b8860b",
|
|
26
|
+
"darkgray": "#a9a9a9",
|
|
27
|
+
"darkgreen": "#006400",
|
|
28
|
+
"darkgrey": "#a9a9a9",
|
|
29
|
+
"darkkhaki": "#bdb76b",
|
|
30
|
+
"darkmagenta": "#8b008b",
|
|
31
|
+
"darkolivegreen": "#556b2f",
|
|
32
|
+
"darkorange": "#ff8c00",
|
|
33
|
+
"darkorchid": "#9932cc",
|
|
34
|
+
"darkred": "#8b0000",
|
|
35
|
+
"darksalmon": "#e9967a",
|
|
36
|
+
"darkseagreen": "#8fbc8f",
|
|
37
|
+
"darkslateblue": "#483d8b",
|
|
38
|
+
"darkslategray": "#2f4f4f",
|
|
39
|
+
"darkslategrey": "#2f4f4f",
|
|
40
|
+
"darkturquoise": "#00ced1",
|
|
41
|
+
"darkviolet": "#9400d3",
|
|
42
|
+
"deeppink": "#ff1493",
|
|
43
|
+
"deepskyblue": "#00bfff",
|
|
44
|
+
"dimgray": "#696969",
|
|
45
|
+
"dimgrey": "#696969",
|
|
46
|
+
"dodgerblue": "#1e90ff",
|
|
47
|
+
"firebrick": "#b22222",
|
|
48
|
+
"floralwhite": "#fffaf0",
|
|
49
|
+
"forestgreen": "#228b22",
|
|
50
|
+
"fuchsia": "#ff00ff",
|
|
51
|
+
"gainsboro": "#dcdcdc",
|
|
52
|
+
"ghostwhite": "#f8f8ff",
|
|
53
|
+
"goldenrod": "#daa520",
|
|
54
|
+
"gold": "#ffd700",
|
|
55
|
+
"gray": "#808080",
|
|
56
|
+
"green": "#008000",
|
|
57
|
+
"greenyellow": "#adff2f",
|
|
58
|
+
"grey": "#808080",
|
|
59
|
+
"honeydew": "#f0fff0",
|
|
60
|
+
"hotpink": "#ff69b4",
|
|
61
|
+
"indianred": "#cd5c5c",
|
|
62
|
+
"indigo": "#4b0082",
|
|
63
|
+
"ivory": "#fffff0",
|
|
64
|
+
"khaki": "#f0e68c",
|
|
65
|
+
"lavenderblush": "#fff0f5",
|
|
66
|
+
"lavender": "#e6e6fa",
|
|
67
|
+
"lawngreen": "#7cfc00",
|
|
68
|
+
"lemonchiffon": "#fffacd",
|
|
69
|
+
"lightblue": "#add8e6",
|
|
70
|
+
"lightcoral": "#f08080",
|
|
71
|
+
"lightcyan": "#e0ffff",
|
|
72
|
+
"lightgoldenrodyellow": "#fafad2",
|
|
73
|
+
"lightgray": "#d3d3d3",
|
|
74
|
+
"lightgreen": "#90ee90",
|
|
75
|
+
"lightgrey": "#d3d3d3",
|
|
76
|
+
"lightpink": "#ffb6c1",
|
|
77
|
+
"lightsalmon": "#ffa07a",
|
|
78
|
+
"lightseagreen": "#20b2aa",
|
|
79
|
+
"lightskyblue": "#87cefa",
|
|
80
|
+
"lightslategray": "#778899",
|
|
81
|
+
"lightslategrey": "#778899",
|
|
82
|
+
"lightsteelblue": "#b0c4de",
|
|
83
|
+
"lightyellow": "#ffffe0",
|
|
84
|
+
"lime": "#00ff00",
|
|
85
|
+
"limegreen": "#32cd32",
|
|
86
|
+
"linen": "#faf0e6",
|
|
87
|
+
"magenta": "#ff00ff",
|
|
88
|
+
"maroon": "#800000",
|
|
89
|
+
"mediumaquamarine": "#66cdaa",
|
|
90
|
+
"mediumblue": "#0000cd",
|
|
91
|
+
"mediumorchid": "#ba55d3",
|
|
92
|
+
"mediumpurple": "#9370db",
|
|
93
|
+
"mediumseagreen": "#3cb371",
|
|
94
|
+
"mediumslateblue": "#7b68ee",
|
|
95
|
+
"mediumspringgreen": "#00fa9a",
|
|
96
|
+
"mediumturquoise": "#48d1cc",
|
|
97
|
+
"mediumvioletred": "#c71585",
|
|
98
|
+
"midnightblue": "#191970",
|
|
99
|
+
"mintcream": "#f5fffa",
|
|
100
|
+
"mistyrose": "#ffe4e1",
|
|
101
|
+
"moccasin": "#ffe4b5",
|
|
102
|
+
"navajowhite": "#ffdead",
|
|
103
|
+
"navy": "#000080",
|
|
104
|
+
"oldlace": "#fdf5e6",
|
|
105
|
+
"olive": "#808000",
|
|
106
|
+
"olivedrab": "#6b8e23",
|
|
107
|
+
"orange": "#ffa500",
|
|
108
|
+
"orangered": "#ff4500",
|
|
109
|
+
"orchid": "#da70d6",
|
|
110
|
+
"palegoldenrod": "#eee8aa",
|
|
111
|
+
"palegreen": "#98fb98",
|
|
112
|
+
"paleturquoise": "#afeeee",
|
|
113
|
+
"palevioletred": "#db7093",
|
|
114
|
+
"papayawhip": "#ffefd5",
|
|
115
|
+
"peachpuff": "#ffdab9",
|
|
116
|
+
"peru": "#cd853f",
|
|
117
|
+
"pink": "#ffc0cb",
|
|
118
|
+
"plum": "#dda0dd",
|
|
119
|
+
"powderblue": "#b0e0e6",
|
|
120
|
+
"purple": "#800080",
|
|
121
|
+
"rebeccapurple": "#663399",
|
|
122
|
+
"red": "#ff0000",
|
|
123
|
+
"rosybrown": "#bc8f8f",
|
|
124
|
+
"royalblue": "#4169e1",
|
|
125
|
+
"saddlebrown": "#8b4513",
|
|
126
|
+
"salmon": "#fa8072",
|
|
127
|
+
"sandybrown": "#f4a460",
|
|
128
|
+
"seagreen": "#2e8b57",
|
|
129
|
+
"seashell": "#fff5ee",
|
|
130
|
+
"sienna": "#a0522d",
|
|
131
|
+
"silver": "#c0c0c0",
|
|
132
|
+
"skyblue": "#87ceeb",
|
|
133
|
+
"slateblue": "#6a5acd",
|
|
134
|
+
"slategray": "#708090",
|
|
135
|
+
"slategrey": "#708090",
|
|
136
|
+
"snow": "#fffafa",
|
|
137
|
+
"springgreen": "#00ff7f",
|
|
138
|
+
"steelblue": "#4682b4",
|
|
139
|
+
"tan": "#d2b48c",
|
|
140
|
+
"teal": "#008080",
|
|
141
|
+
"thistle": "#d8bfd8",
|
|
142
|
+
"tomato": "#ff6347",
|
|
143
|
+
"turquoise": "#40e0d0",
|
|
144
|
+
"violet": "#ee82ee",
|
|
145
|
+
"wheat": "#f5deb3",
|
|
146
|
+
"white": "#ffffff",
|
|
147
|
+
"whitesmoke": "#f5f5f5",
|
|
148
|
+
"yellow": "#ffff00",
|
|
149
|
+
"yellowgreen": "#9acd32"
|
|
150
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import pathlib
|
|
3
|
+
|
|
4
|
+
class ColorReg:
|
|
5
|
+
def __init__(self):
|
|
6
|
+
script_dir = pathlib.Path(__file__).resolve().parent
|
|
7
|
+
file_path = script_dir / "colors.json"
|
|
8
|
+
|
|
9
|
+
with open(file_path, "r", encoding="utf-8") as f:
|
|
10
|
+
self._color_dict = json.load(f)
|
|
11
|
+
|
|
12
|
+
def __getattr__(self, name):
|
|
13
|
+
formatted_name = name.lower().replace("_", "").replace(" ", "")
|
|
14
|
+
|
|
15
|
+
if formatted_name in self._color_dict:
|
|
16
|
+
return self._color_dict[formatted_name]
|
|
17
|
+
|
|
18
|
+
raise AttributeError(f"'ColorReg' object has no attribute '{name}'")
|
|
19
|
+
|
|
20
|
+
colors = ColorReg()
|