
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
colorinterpreter
Advanced tools
ColorInterpreter is a module able to convert any acceptable browser color-scheme to any other acceptable browser color-scheme.
A javascript module to interpret and output browser color strings.
ColorInterpreter support the following browser color strings with inspiration from the Mozilla Documentation:
Furthermore the following values can be obtained from a Color object:
To install using NPM simply type:
$ npm install colorinterpreter --save
$ bower install colorinterpreter --save
var ColorInterpreter = require("colorinterpreter");
var Color = ColorInterpreter.Color;
var ColorError = ColorInterpreter.ColorError;
var gold = new Color("gold");
// Formats to output
gold.toHEX(); // #FFD700 - The HEX color string
gold.toHEXA(); // #FFD700FF - The HEXA color string
gold.toPercentageRGB(); // rgb(100%,84.31%,0%) - The RGB in percent color string
gold.toPercentageRGBA(); // rgba(100%,84.31%,0%,1) - The RGBA in percent color string
gold.toRGB(); // rgb(255,215,0) - The RGB color string
gold.toRGBA(); // rgba(255,215,0,1) - The RGBA color string
gold.toHSL(); // hsl(50.59,100%,50%) - The HSL color string
gold.toHSLA(); // hsla(50.59,100%,50%,1) - The HSLA color string
gold.toKeyword(); // gold - The Keyword color string
// Additional information about color
gold.brightness(); // 202.45 - The brightness value
gold.luminance(); // 0.6986087742815887 - The luminance value
gold.difference("#FFF"); // 295 - The difference between gold and white
gold.red(); // 255 - The RGBA red value
gold.green(); // 215 - The RGBA green value
gold.blue(); // 0 - The RGBA blue value
gold.alpha(); // 1 - The RGBA alpha value
gold.isValid(); // true - States that the parsed color string is valid
// Mutators
gold.setFixed(6); // Returns formats with up to 6 decimals
// Utility methods
gold.clone() // Creates a clone of the gold object
gold.equals("#FFF") // Checks if the color is equal to the argument
<script src="dist/colorinterpreter.min.js" type="text/javascript">
</script>
<script type="text/javascript">
var Color = window.ColorInterpreter.Color;
var ColorError = window.ColorInterpreter.ColorError;
var gold = new Color("gold");
// Formats to output
gold.toHEX(); // #FFD700 - The HEX color string
gold.toHEXA(); // #FFD700FF - The HEXA color string
gold.toPercentageRGB(); // rgb(100%,84.31%,0%) - The RGB in percent color string
gold.toPercentageRGBA(); // rgba(100%,84.31%,0%,1) - The RGBA in percent color string
gold.toRGB(); // rgb(255,215,0) - The RGB color string
gold.toRGBA(); // rgba(255,215,0,1) - The RGBA color string
gold.toHSL(); // hsl(50.59,100%,50%) - The HSL color string
gold.toHSLA(); // hsla(50.59,100%,50%,1) - The HSLA color string
gold.toKeyword(); // gold - The Keyword color string
// Additional information about color
gold.brightness(); // 202.45 - The brightness value
gold.luminance(); // 0.6986087742815887 - The luminance value
gold.difference("#FFF"); // 295 - The difference between gold and white
gold.red(); // 255 - The RGBA red value
gold.green(); // 215 - The RGBA green value
gold.blue(); // 0 - The RGBA blue value
gold.alpha(); // 1 - The RGBA alpha value
gold.isValid(); // true - States that the parsed color string is valid
// Mutators
gold.setFixed(6); // Returns formats with up to 6 decimals
// Utility methods
gold.clone() // Creates a clone of the gold object
gold.equals("#FFF") // Checks if the color is equal to the argument
</script>
The full documentation of the module can be found here.
FAQs
ColorInterpreter is a module able to convert any acceptable browser color-scheme to any other acceptable browser color-scheme.
The npm package colorinterpreter receives a total of 9 weekly downloads. As such, colorinterpreter popularity was classified as not popular.
We found that colorinterpreter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.