A NodeJS package to convert any RGB color to HEX color or viceversa. Also supports HSL conversion.

Overview

Unhex 🎨

A NodeJS package to convert any RGB color to HEX, HSL color or viceversa.

Example

div {
  color: #fff;
  background-color: #0070f3;
}

After running npx unhex@latest with hexToRgb direction.

div {
  color: rgb(255, 255, 255);
  background-color: rgb(0, 112, 243);
}

Want to try it? 🤔

npx unhex@latest

Features

  • Parse any file on a given directory and convert any color to among HSL, HEX and RGB combinations.
  • Custom configuration to:
    • Ignore certain files, dirs...
    • Define which extensions files to parse (.css, .jsx, .scss, ...)

TO-DO 🚧

  • Support HSL.
  • Support HWB.

MIT License

You might also like...

Minimal utility to convert to or from any timezone. Deno/Node/Browser. ESM/CommonJS.

minitz Features Convert dates between any timezone supported by the system. Parses ISO8601 time strings. MIT licensed, use the library any way you wan

Oct 10, 2022

A single-page application that allows users to keep track of their books. Users can add the book details (book title and author) and also, and the books can also be removed. Built with JavaScript, HTML, and CSS

Project Name Awesome book with ES6 Description the project. This is a single page application that allows users to keep track of their books. Users ca

Oct 13, 2022

Airtable for TypeScript and JavaScript (ES7, ES6, ES5). Supports Airtable database. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

Airtable for TypeScript and JavaScript (ES7, ES6, ES5). Supports Airtable database. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeAirtable is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be

Sep 11, 2022

Change the color of an image to a specific color you have in mind.

image-recolor Run it: https://image-recolor.vercel.app/ image.recolor.mov Acknowledgments Daniel Büchele for the algorithm: https://twitter.com/daniel

Oct 25, 2022

A little toy app to help you find the nearest match for a given color within a Figma Tokens color palette.

A little toy app to help you find the nearest match for a given color within a Figma Tokens color palette.

Hey Palette So you've got a color palette in Figma and you've used the Figma Tokens plugin to export that palette to JSON. Let's say you have a color

Nov 15, 2022

Tool Cool Color Picker is a color picker library written in typescript and using web component technologies.

Tool Cool Color Picker is a color picker library written in typescript and using web component technologies.

Tool Cool Color Picker Tool Cool Color Picker is a color picker library written in typescript and using web component technologies. Check out the demo

Oct 23, 2022

Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr Colr Pickr, a vanilla JavaScript color picking component built with SVGs, with features like saving colors. Similar design to the chrome-de

Jun 27, 2022
Comments
  • feature: select file extension to be completed in a single session.

    feature: select file extension to be completed in a single session.

    Description

    In order to update color formats for files of different extensions the user gets prompted with the File extensions to convert multiple times until -- option is selected.

    Improvement

    Instead of getting multiple prompts to select file extensions, the user should be able to select file extensions in a single session. In order to escape this session a key press ( like a ESC key ) has to be kept in place rather than selecting -- which doesn't give much information to the user on this option being the end point for this session. For the ESC key scenario a text message similar to [Press ESC key to end session] can be placed at the bottom of extensions options.

    Existing Flow

    $ npx unhex@latest
    ? File extensions to convert .css
    Extensions selected:  .css
    ? File extensions to convert .jsx
    Extensions selected:  .css, .jsx
    ? File extensions to convert .scss
    Extensions selected:  .css, .jsx, .scss
    ? File extensions to convert --
    Extensions selected:  .css, .jsx, .scss 
    

    Proposed Flow

    Case 1: 
    $ npx unhex@latest
    ? File extensions to convert 
     ❯ * 
      .css 
      .jsx 
      .tsx 
      .scss 
      .svelte 
      .vue 
    [Press ESC key to end session]
    
    Case 2: 
      Iteration 1: Select 1st extension
      $ npx unhex@latest
      ? File extensions to convert 
        * 
       ❯ .css 
        .jsx 
        .tsx 
        .scss 
        .svelte 
        .vue 
      Extensions selected:  .css
      [Press ESC key to end session]
    
      Iteration 2:  Select 2nd extension
           $ npx unhex@latest
          ? File extensions to convert 
            * 
           .css 
            .jsx 
            ❯ .tsx 
            .scss 
            .svelte 
            .vue 
          Extensions selected:  .css, .tsx
          [Press ESC key to end session]
    
     Iteration 3:  Press ESC key
        $ npx unhex@latest
        ? File extensions to convert 
        Extensions selected:  .css, .tsx
    

    Note: I can be the assignee for this update as I find this package very useful for color scheme refactors.

    enhancement good first issue 
    opened by vaishak10 3
Releases(v0.0.36)
Owner
Arnau Espin
🔱
Arnau Espin
The time represented as hex color values

A clock that represents the time as hex color values I saw a project a little while ago, where I discovered that the time (in format 00:00:00) works p

Jamel 39 Aug 16, 2022
CLI Progress Bar implemented in NodeJS to track Time, ETA and Steps for any long running jobs in any loops in JS, NodeJS code

NodeJS-ProgressBar CLI Progress Bar for NodeJS and JavaScript to track Time, ETA and Steps for any long running jobs in any loops in JS, NodeJS code D

Atanu Sarkar 5 Nov 14, 2022
This package generates a unique ID/String for different browsers. Like chrome, Firefox and any other browsers which supports canvas and audio Fingerprinting.

Broprint.js The world's easiest, smallest and powerful visitor identifier for browsers. This package generates a unique ID/String for different browse

Rajesh Royal 68 Dec 25, 2022
A tiny utility library to generate mesh gradient based on 4 RGB colors, built with vanilla js.

MeshGradient.js mesh-gradient.js is tiny utility library to generate mesh gradient based on 4 RGB colors, built with vanilla js. Installation! npm ins

Anup Aglawe 7 Jan 4, 2023
An interactive list of plugins for hex-rays' IDA Pro

Interactive IDA Plugin List This is a comprehensive list of plugins for IDA Pro that is more interactive, that is, it can be sorted and filtered to he

Vincent Mallet 106 Dec 26, 2022
A tiny isomorphic fast function for generating a cryptographically random hex string.

ZeptoID A tiny isomorphic fast function for generating a cryptographically random hex string. Accoding to this calculator one would have to generate i

Fabio Spampinato 9 Oct 24, 2022
Get a quick hash that uses the well-liked Bernstein "times 33" hash method and delivers a hex string.

short-hash-ts -> Get a quick hash that uses the well-liked Bernstein "times 33" hash method and delivers a hex string. Installation Install short-hash

Younis Rahman 3 Sep 4, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
Small js library to animate some writing effect through a list of strings. It also supports settings for typo errors, to make it more human likely.

Write and Delete Small js library to animate some writing effect through a list of strings. It also supports settings for typo errors, to make it more

fabs 2 Nov 15, 2022
Convert any webpage into bionified text!

Bionify - Read Faster! LEGAL NOTICE: To the wonderful folks at Bionic Reading®, this is not a pirated version of your Bionic Reading® API, but rather

Vincent 96 Dec 8, 2022