@types/chroma-js
Advanced tools
Comparing version 1.3.7 to 1.4.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for Chroma.js 1.3 | ||
// Type definitions for Chroma.js 1.4 | ||
// Project: https://github.com/gka/chroma.js | ||
@@ -263,5 +263,14 @@ // Definitions by: Sebastian Brückner <https://github.com/invliD>, Marcin Pacholec <https://github.com/mpacholec> | ||
/** | ||
* Get color as hexadecimal string. E.g. '#ffa500' | ||
* Get color as hexadecimal string. | ||
* | ||
* @param mode `auto` - string will include alpha channel only if it's less than 1. | ||
* `rgb` - string will not include alpha channel. | ||
* `rgba` - string will include alpha channel. | ||
* | ||
* @example | ||
* chroma('orange').hex() === '#ffa500' | ||
* chroma('orange').alpha(0.5).hex() === '#ffa50080' | ||
* chroma('orange').alpha(0.5).hex('rgb') === '#ffa500' | ||
*/ | ||
hex(): string; | ||
hex(mode?: 'auto' | 'rgb' | 'rgba'): string; | ||
@@ -284,2 +293,13 @@ /** | ||
temperature(): number; | ||
/** | ||
* Returns the numeric representation of the hexadecimal RGB color. | ||
* | ||
* @example | ||
* chroma('#000000').num() === 0 | ||
* chroma('#0000ff').num() === 255 | ||
* chroma('#00ff00').num() === 65280 | ||
* chroma('#ff0000').num() === 16711680 | ||
*/ | ||
num(): number; | ||
} & { | ||
@@ -286,0 +306,0 @@ [K in keyof ColorSpaces]: () => ColorSpaces[K]; |
{ | ||
"name": "@types/chroma-js", | ||
"version": "1.3.7", | ||
"version": "1.4.0", | ||
"description": "TypeScript definitions for Chroma.js", | ||
@@ -25,4 +25,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "fd30a4db2e41455f3e9466c8ed11cfd956073cc39bb17d9f09b05a0570fbe5b1", | ||
"typesPublisherContentHash": "1102054c6d200e960121ca6256229968fa659c9fc31ed86e8059531a5ead8163", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Thu, 27 Sep 2018 23:26:03 GMT | ||
* Last updated: Wed, 03 Oct 2018 17:56:18 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: chroma |
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
16421
318