balacolor 1.0.0 → 3.0.0
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.
- package/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
const palettes = {
|
|
2
2
|
"ocean": ["#0077be", "#5f9ea0", "#4682b4", "#b0c4de"],
|
|
3
3
|
"sunset": ["#ff5f6d", "#ffc371", "#ff9a9e", "#fecfef"],
|
|
4
|
-
"forest": ["#2d5a27", "#4b7a47", "#76a665", "#a8c69f"]
|
|
4
|
+
"forest": ["#2d5a27", "#4b7a47", "#76a665", "#a8c69f"],
|
|
5
|
+
"desert": ["#edc9af", "#c2b280", "#a67b5b", "#8b5e3c"],
|
|
6
|
+
"mountain": ["#6b8e23", "#556b2f", "#8fbc8f", "#a9ba9d"],
|
|
7
|
+
"rose": ["#ff007f", "#ff66a3", "#ff99c2", "#ffb3d1"],
|
|
8
|
+
"yellow": ["#ffea00", "#fff176", "#fff59d", "#fff9c4"],
|
|
9
|
+
"purple": ["#9b30ff", "#ba55d3", "#dda0dd", "#800080"],
|
|
5
10
|
};
|
|
6
11
|
|
|
7
12
|
function getPalette(name) {
|
|
8
13
|
const palette = palettes[name.toLowerCase()];
|
|
9
|
-
return palette || "Palette not found. Try 'ocean', 'sunset', or '
|
|
14
|
+
return palette || "Palette not found. Try 'ocean', 'sunset', 'forest', 'desert', 'mountain', 'rose', 'yellow', or 'purple'.";
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
// This is the important part for npm!
|