Skip to content
Discussion options

You must be logged in to vote

Install hsl-refactored

@jh3y Here's what I came up with. Any questions?

// Menu: HSL
// Description: Convert any color to HSL.
// Author: Jhey Tompkins
// Twitter: @jh3yy

let { setSelectedText } = await kit("text")
const Color = await npm("color")

const createHTML = color =>
  `<div class="h-full text-xs flex justify-center items-center" style="background-color: ${color}"><span class="p-2">${
    color || ""
  }</span></div>`

const createChoices = (input, value) => {
  return [
    {
      name: `hsl: ${value}`,
      value: value,
      //I renamed "info" to "html"
      html: createHTML(input),
    },
  ]
}

const hslArray = await arg("Color String:", input => {
  let hsl = input
  try 

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jh3y
Comment options

Answer selected by johnlindquist
Comment options

You must be logged in to vote
1 reply
@jh3y
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Errors
Labels
None yet
2 participants