How to use the pts.Color.hsl function in pts

To help you get started, we’ve selected a few pts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexeden / rpi-led-matrix / app / web / src / app / canvas / canvas.component.ts View on Github external
withLatestFrom(this.pointer, ({ t }, ptr) => {
        const radius = Math.round(Num.cycle((t % 1000) / 1000) * 10);
        const [x, y] = ptr.map(Math.round);
        const color = Color.hsl(x % 360, 1, 0.5);
        this.form
          .fill(Color.HSLtoRGB(color).toString('rgb'))
          .point(ptr, radius, 'circle')
          .textBox([new Pt(x, y).add(radius + 5, -20), new Pt(x, y).add(100, 20)], `${x + radius}, ${y}`, 'middle');
      })
    )