How to use the @pluginjs/color.Converter.HSLtoHEX function in @pluginjs/color

To help you get started, we’ve selected a few @pluginjs/color 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 pluginjs / pluginjs / modules / color-picker / src / components / saturation.js View on Github external
const top = (1 - color.value.v) * this.maxLengthY - this.size
    const hue = color.value.h

    this.hue = color.value.h

    setStyle(
      {
        top: `${top}px`,
        left: `${left}px`
      },
      this.$pointer
    )

    setStyle(
      {
        backgroundColor: Converter.HSLtoHEX({
          h: hue,
          s: 1,
          l: 0.5
        })
      },
      this.element
    )
  }
github pluginjs / pluginjs / modules / color-selector / src / components / saturation.js View on Github external
const top = (1 - color.value.v) * this.maxLengthY - this.size
    const hue = color.value.h

    this.hue = color.value.h

    setStyle(
      {
        top: `${top}px`,
        left: `${left}px`
      },
      this.$pointer
    )

    setStyle(
      {
        backgroundColor: Converter.HSLtoHEX({
          h: hue,
          s: 1,
          l: 0.5
        })
      },
      this.element
    )
  }

@pluginjs/color

A flexible modern color js plugin.

GPL-3.0
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages