Skip to content

Commit

Permalink
refactor(colors): minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Apr 1, 2021
1 parent 87eac78 commit 7575146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/color/src/defcolor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IDeref, NumericArray } from "@thi.ng/api";
import type { NumericArray } from "@thi.ng/api";
import {
implementsFunction,
isArrayLike,
Expand Down Expand Up @@ -158,7 +158,7 @@ export const defColor = <M extends ColorMode, K extends string>(
? fromColor(src, (<IColor>src).mode, xs)
: <any>new $Color(<NumericArray>src, ...xs)
: implementsFunction(src, "deref")
? fromColor((<IDeref<any>>src).deref(), (<IColor>src).mode, xs)
? fromColor(src.deref(), (<IColor>src).mode, xs)
: isNumber(src)
? xs.length && xs.every(isNumber)
? <any>new $Color(...ensureArgs([src, ...xs]))
Expand Down

0 comments on commit 7575146

Please sign in to comment.