1.0.11 • Published 1 year ago

@jexop/color v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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

1 year ago

1.0.10

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago