Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
heatmap-values
Advanced tools
Generate heatmap with RGBA from pre-built or custom color scheme.
Designed for class activation map of image classifier AI model visualization.
npm install heatmap-values
You can also install heatmap-values
with pnpm, yarn, or slnpm
import { generate_heatmap_values, heatmap_schemes } from 'heatmap-values'
let values = generate_heatmap_values(heatmap_schemes.red_transparent_blue)
for (let i = 0; i < 256; i++) {
let [r, g, b, a] = values[i]
let color = `rgba(${r},${g},${b},${a})`
console.log(i / 255, color)
}
Detail usage example see demo.ts and demo.html.
export function generate_heatmap_values(
/** @description default is red_transparent_blue */
scheme?: HeatmapScheme,
): RGBA[]
export type HeatmapScheme = {
low: RGBA
middle: RGBA
high: RGBA
}
export type RGBA = [
/** @description 0..255 */
r: number,
/** @description 0..255 */
g: number,
/** @description 0..255 */
b: number,
/** @description 0..1 */
a: number,
]
export const heatmap_schemes: {
red_green_blue: HeatmapScheme
red_transparent_blue: HeatmapScheme
hot_only: HeatmapScheme
cold_only: HeatmapScheme
}
This project is licensed with BSD-2-Clause
This is free, libre, and open-source software. It comes down to four essential freedoms [ref]:
FAQs
Generate heatmap with RGBA from pre-built or custom color scheme.
The npm package heatmap-values receives a total of 12 weekly downloads. As such, heatmap-values popularity was classified as not popular.
We found that heatmap-values demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.