1.0.11 • Published 25 days ago

@jexop/color v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
25 days ago

JSON Expression Color Operators

Basic Usage

import { evaluate, registry } from '@jexop/core';
import { colorOperators } from '@jexop/color';

// register default operators
registry.addDefaults();
// register color operators
registry.add(colorOperators);

Color Operators

color-range

Returns color from a gradient from-to

PropertyDescription
from (color)Color when value is 0
to (color)Color when value is 1
value (number)Normalized number (in range 0-1)

Examples

{
  "op": "color-range",
  "from": "red",
  "to": "green",
  "value": 0.7
}
{
  "op": "color-range",
  "from": "red",
  "to": "green",
  "value": {
    "op": "normalize",
    "min": 0,
    "max": 100,
    "value": 70
  }
}
1.0.11

25 days ago

1.0.10

4 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago