super-color
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "super-color", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Small & Fast Color conversion library.", | ||
@@ -29,3 +29,5 @@ "main": "./lib/index.js", | ||
"license": "GPL-3.0-or-later", | ||
"files": ["lib/**/*"], | ||
"files": [ | ||
"lib/**/*" | ||
], | ||
"bugs": { | ||
@@ -38,2 +40,2 @@ "url": "https://github.com/arnaudpfu/super-color/issues" | ||
} | ||
} | ||
} |
# Super Color | ||
Small & Fast Color conversion library. | ||
## Installation | ||
```` | ||
``` | ||
npm i super-color | ||
```` | ||
``` | ||
## Examples | ||
````ts | ||
const n: number = 5; | ||
```` | ||
```ts | ||
import SuperColor from "super-color"; | ||
const superColor = new SuperColor("#f00"); | ||
console.log(superColor.toString()); // #f00 | ||
superColor.setFormat("hsl"); | ||
console.log(superColor.toString()); // hsl(0deg, 100%, 50%) | ||
superColor.setFormat("rgb"); | ||
console.log(superColor.toString()); // rgb(255, 0, 0) | ||
superColor.setAlpha(0.5); | ||
console.log(superColor.toString()); // rgba(255, 0, 0, 0.5) | ||
superColor.setHsv({ h: 100, v: 0.8 }); | ||
console.log(superColor.toString()); // rgba(67, 204, 0, 0.5) | ||
superColor.setFormat("hex"); | ||
console.log(superColor.toString()); // #43CC0080 | ||
``` | ||
## License | ||
[GPL](https://www.gnu.org/licenses/gpl-3.0.html) licensed. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71864
38