New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

bs-parse-color

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-parse-color

BuckleScript bindings for the parse-color js library

latest
Source
npmnpm
Version
0.6.1
Version published
Maintainers
1
Created
Source

bs-parse-color

License: MIT CircleCI

Pretty naive BuckleScript bindings for parse-color

I'm very new to Reason, so i do not recommend using this for anything more than a toy, please open an issue / leave comments if you have a better ideas on some of the parts.

Installation

With yarn

yarn add bs-parse-color

Or with npm

npm install bs-parse-color

Then add bs-parse-color to your bsconfig.json file as a dependency

{
  ...
  "bs-dependencies": [ "bs-parse-color" ]
  ...
}

Usage

/* call .parse with an argument of any color type */
let col = "orange" | "#FF6600" | "rgb(10,20,30)" | "rgba(10,20,20,0.5)" ...
let parsed = ParseColor.parse(col);

/* convert the parsed color into another type */
parsed |> asHex;
parsed |> asRgba;
parsed |> asCmkya;

/* access a color mode */
parsed.rgba

Keywords

BuckleScript

FAQs

Package last updated on 16 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts