Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thi.ng/color

Package Overview
Dependencies
Maintainers
0
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/color - npm Package Compare versions

Comparing version 5.6.46 to 5.6.47

10

CHANGELOG.md
# Change Log
- **Last updated**: 2024-06-21T19:34:38Z
- **Last updated**: 2024-06-29T09:28:35Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,10 @@

### [5.6.47](https://github.com/thi-ng/umbrella/tree/@thi.ng/color@5.6.47) (2024-06-29)
#### 🩹 Bug fixes
- update color ctor handling for single ARGB int args ([8ab6083](https://github.com/thi-ng/umbrella/commit/8ab6083))
- interpret sole int arg as sRGB, **not** as linear RGB
- add tests
### [5.6.46](https://github.com/thi-ng/umbrella/tree/@thi.ng/color@5.6.46) (2024-06-21)

@@ -14,0 +22,0 @@

4

defcolor.js

@@ -18,3 +18,3 @@ import { implementsFunction } from "@thi.ng/checks/implements-function";

import { parseCss } from "./css/parse-css.js";
import { intArgb32Rgb } from "./int/int-rgb.js";
import { intArgb32Srgb } from "./int/int-srgb.js";
import { __ensureArgs } from "./internal/ensure.js";

@@ -110,3 +110,3 @@ const defColor = (spec) => {

};
const factory = (src, ...args) => src == null ? new $Color() : isString(src) ? factory(parseCss(src), ...args) : isArrayLike(src) ? isString(src.mode) ? fromColor(src, src.mode, args) : new $Color(src, ...args) : implementsFunction(src, "deref") ? fromColor(src.deref(), src.mode, args) : isNumber(src) ? args.length && args.every(isNumber) ? new $Color(...__ensureArgs([src, ...args])) : fromColor(intArgb32Rgb([], src), "rgb", args) : illegalArgs(`can't create a ${spec.mode} color from: ${src}`);
const factory = (src, ...args) => src == null ? new $Color() : isString(src) ? factory(parseCss(src), ...args) : isArrayLike(src) ? isString(src.mode) ? fromColor(src, src.mode, args) : new $Color(src, ...args) : implementsFunction(src, "deref") ? fromColor(src.deref(), src.mode, args) : isNumber(src) ? args.length && args.every(isNumber) ? new $Color(...__ensureArgs([src, ...args])) : fromColor(intArgb32Srgb([], src), "srgb", args) : illegalArgs(`can't create a ${spec.mode} color from: ${src}`);
factory.class = $Color;

@@ -113,0 +113,0 @@ factory.range = [min, max];

{
"name": "@thi.ng/color",
"version": "5.6.46",
"version": "5.6.47",
"description": "Array-based color types, CSS parsing, conversions, transformations, declarative theme generation, gradients, presets",

@@ -43,15 +43,15 @@ "type": "module",

"dependencies": {
"@thi.ng/api": "^8.11.3",
"@thi.ng/arrays": "^2.9.7",
"@thi.ng/binary": "^3.4.26",
"@thi.ng/checks": "^3.6.5",
"@thi.ng/compare": "^2.3.6",
"@thi.ng/compose": "^3.0.5",
"@thi.ng/defmulti": "^3.0.40",
"@thi.ng/errors": "^2.5.8",
"@thi.ng/math": "^5.11.0",
"@thi.ng/random": "^3.8.1",
"@thi.ng/strings": "^3.7.34",
"@thi.ng/transducers": "^9.0.6",
"@thi.ng/vectors": "^7.11.0"
"@thi.ng/api": "^8.11.4",
"@thi.ng/arrays": "^2.9.8",
"@thi.ng/binary": "^3.4.27",
"@thi.ng/checks": "^3.6.6",
"@thi.ng/compare": "^2.3.7",
"@thi.ng/compose": "^3.0.6",
"@thi.ng/defmulti": "^3.0.41",
"@thi.ng/errors": "^2.5.9",
"@thi.ng/math": "^5.11.1",
"@thi.ng/random": "^3.8.2",
"@thi.ng/strings": "^3.7.35",
"@thi.ng/transducers": "^9.0.7",
"@thi.ng/vectors": "^7.11.1"
},

@@ -449,3 +449,3 @@ "devDependencies": {

},
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n"
"gitHead": "7b950c112fba0b2e7c450765b15624c3382f1354\n"
}

@@ -10,3 +10,3 @@ <!-- This file is generated - DO NOT EDIT! -->

> [!NOTE]
> This is one of 193 standalone projects, maintained as part
> This is one of 189 standalone projects, maintained as part
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo

@@ -13,0 +13,0 @@ > and anti-framework.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc