open-index/open-npm huggingface dataset:
npm package: @linktime/dependency-graph
Description: Dependency graph component
Author: Grace Shi
Latest version: 1.0.0

## Dependency Graph

---

**Usage**
```javascript
const graph = new Graph({ width, height }, { layout, direction })

```

---
**Data Structure**

```
{
  nodes: [
    {
      id: {{ nodeId }},
      shape: 'circle|rect',
      radius: {{ number }},
      width: {{ number }},
      height: {{ number }},
      customNode: {{ function }},
      style: {
        color: {{ hexColor }},
        opacity: {{ number: 0 -> 1 }},
        border: {
          color: {{ hexColor }},
          width: {{ number }}
        }
      }
    }
  ],
  links: [{
    source: {{ sourceNodeId }},
    target: {{ targetNodeId }},
    anchor: {
      source: 'auto|left|right|top|bottom',
      target: 'auto|left|right|top|bottom'
    },
    endpoints: [
      {
        color: {{ hexColor }},
        height: {{ number }},
        width: {{ number }},
        shape: 'arrow|square'
      }
    ],
    style: {
      color: {{ hexColor }},
      width: {{ number }}
    }
  }]
}
```

---
npm package: @linktime/palette
Description: Color converter and generator.
Author: Grace
Latest version: 1.0.2

# @linktime/palette

> JavaScript Util library to convert color and generate color.



## Install
```console
$ npm install @linktime/palette
```

## Usage
```js
import palette from '@linktime/palette'
// Generate 20 colors from default colors
const colors = palette(20)
```

## Examples
```console
$ npm run example
```
Open http://127.0.0.1:8080/example/

_Generate colors, convert hex color to hsl color_
```js
import palette, { hex2hsl } from '@linktime/palette'
// Generate 20 colors from default colors
const colors = palette(20)
const hslColor = hex2hsl('#ffffff') // Output hsl(0, 0%, 100%)
```

_Generate colors from default colors, control color lightness_
```js
import palette from '@linktime/palette'
// Generate 30 lighter colors from default colors
const colors = palette(30, 0.1, ['#1d121c', '#232323', '#23456f'])

// Generate 30 darker colors from default colors
const colors = palette(30, -0.1, ['#dddddd', '#eeeeee', '#dedede'])
```

_Generate colors from your colors_
```js
import palette from '@linktime/palette'
// Generate 20 colors from default colors
const colors = palette(20, 0.1, ['#1d121c', '#232323', '#23456f'])
```
check [Test folder](/test/index.js) for more examples.

## Test
```console
$ npm run test
```

## TODO
Use alogrithm to generate color scheme