balacolor 1.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.
Files changed (2) hide show
  1. package/index.js +13 -0
  2. package/package.json +14 -0
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ const palettes = {
2
+ "ocean": ["#0077be", "#5f9ea0", "#4682b4", "#b0c4de"],
3
+ "sunset": ["#ff5f6d", "#ffc371", "#ff9a9e", "#fecfef"],
4
+ "forest": ["#2d5a27", "#4b7a47", "#76a665", "#a8c69f"]
5
+ };
6
+
7
+ function getPalette(name) {
8
+ const palette = palettes[name.toLowerCase()];
9
+ return palette || "Palette not found. Try 'ocean', 'sunset', or 'forest'.";
10
+ }
11
+
12
+ // This is the important part for npm!
13
+ module.exports = getPalette;
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "balacolor",
3
+ "version": "1.0.0",
4
+ "description": "demo project for npm registry",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "color"
11
+ ],
12
+ "author": "balaji n",
13
+ "license": "MIT"
14
+ }