
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
rainbow-colors-array-ts
Advanced tools
This library is based on rainbow-colors-array, but it uses TypeScript and is more flexible.
This library is based on rainbow-colors-array, but it uses TypeScript and is more flexible.
npm install rainbow-colors-array-ts
rainbow(arrayLength, type, pastel);
import { rainbow } from "rainbow-colors-array-ts";
// for a simple rainbow using 7 colors (in hex) and no pastel colors
const colors = rainbow(7);
// [
// { hex: "#f38020" },
// { hex: "#9fe303" },
// { hex: "#33fc44" },
// { hex: "#01b7b3" },
// { hex: "#2f49fb" },
// { hex: "#9a04e6" },
// { hex: "#f11d85" }
// ]
import { rainbow } from "rainbow-colors-array-ts";
// for a simple rainbow using 7 colors (in hex) and pastel colors
const colors = rainbow(7, "hex", true);
// [
// { hex: "#f38020" },
// { hex: "#9fe303" },
// { hex: "#33fc44" },
// { hex: "#01b7b3" },
// { hex: "#2f49fb" },
// { hex: "#9a04e6" },
// { hex: "#f11d85" }
// ]
Other options for the second parameter are "hsl" and "rgb".
import { rainbow } from "rainbow-colors-array-ts";
// for a simple rainbow using 7 colors (in hsl) and no pastel colors
const colors = rainbow(7, "hsl");
// [
// {
// h: 0.07582938388625593,
// s: 0.8978723404255318,
// l: 0.5392156862745098,
// },
// {
// h: 0.21726190476190474,
// s: 0.9739130434782609,
// l: 0.4509803921568627,
// },
// {
// h: 0.34742951907131014,
// s: 0.9710144927536233,
// l: 0.5941176470588235,
// },
// {
// h: 0.49633699633699635,
// s: 0.9891304347826088,
// l: 0.3607843137254902,
// },
// {
// h: 0.6454248366013072,
// s: 0.9622641509433962,
// l: 0.584313725490196,
// },
// {
// h: 0.7772861356932154,
// s: 0.9658119658119657,
// l: 0.45882352941176474,
// },
// {
// h: 0.9182389937106917,
// s: 0.8833333333333333,
// l: 0.5294117647058824,
// },
// ];
FAQs
This library is based on rainbow-colors-array, but it uses TypeScript and is more flexible.
The npm package rainbow-colors-array-ts receives a total of 43 weekly downloads. As such, rainbow-colors-array-ts popularity was classified as not popular.
We found that rainbow-colors-array-ts 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.