![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
flame-gradient
Advanced tools
Input a number between 0 and 1, get an rgb value on a smooth gradient from dark to bright
This module generates flame gradients like this one:
...going from dark almost-black red to bright almost-white yellow.
Get one rgb value for a specific decimal value:
const flameGradient = require('flame-gradient')
const rgb = flameGradient(0.6) // returns 'rgb(255, 150, 1)'
const rgba = flameGradient(0.6, 0.5) // returns 'rgba('255, 150, 1, 0.5)'
Generate an entire gradient:
const generate = require('flame-gradient/generate.js')
const arrayOf1000Rgbs = generate(1000)
console.log(arrayOf1000Rgbs)
generate(1000, (rgb) => {
console.log(rgb) // Logs each of 1000 RGB gradient points
})
View a gradient with a set number of points in a new browser window:
# Defaults to 1000 slices
npm run view
# Set a number of slices
npm run view -- 15
These have been tested to have a good balance of vibrant colour and smooth progression in brightness, such that higher values appear brighter to a consistent amount, including in monohrome and across different types of colour vision deficiency (CVD). This is done by incrementing the R, G and B channels in slightly overlapping sine curves, each slightly stretched based on an approximation of that channel's relative luminosity.
As such they should be usable as colour scales in visualisations.
Examples using CoBlIs:
Monochrome (Achromatopsia):
Protanomaly ("red-weak"):
Deuteranomaly ("green-weak"):
Tritanomaly ("blue-weak"):
Protanopia ("red-blind"):
Deuteranopia ("green-blind")
Tritanopia ("blue-blind")
Blue cone monochromacy
Sponsored by nearForm
MIT
FAQs
Input a number between 0 and 1, get an rgb value on a smooth gradient from dark to bright
The npm package flame-gradient receives a total of 135 weekly downloads. As such, flame-gradient popularity was classified as not popular.
We found that flame-gradient 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.