
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@11ty/image-color
Advanced tools
@11ty/image-colorA small utility to efficiently extract color information from images (with a memoization and a disk-cache). Requires Node 18 or newer.
Install from npm: @11ty/image-color:
npm install @11ty/image-color
Based on the great work of get-pixels (via the @zachleat/get-pixels fork) and extract-colors.
import { getImageColors } from "@11ty/image-color";
// Returns an array of color objects
let colors = await getImageColors("./sample.jpg");
// Works with local or remote images
// let colors = await getImageColors("https://example.com/sample.jpg");
// Get oklch string values
colors.map(c => c.background);
// Get hex values
colors.map(c => c.colorjs.toString({format: "hex"}));
// Filter colors based on Lightness value
colors.filter(c => c.colorjs.oklch.l > .1);
// Sort Lightest colors first
colors.sort((a, b) => {
return b.colorjs.oklch.l - a.colorjs.oklch.l;
})
Learn more about color.js Color objects.
An array of colors in the image, with the following properties:
[{
background, // oklch color string (you probably want this)
foreground, // accessible color for text on top
colorjs, // colorjs.io Color object
mode, // one of "dark" or "light", based on WCAG21 contrast versus #000 or #fff
contrast: {
light, // WCAG21 contrast color (number) versus white (#fff) (4.5+ is good)
dark, // WCAG21 contrast color (number) versus black (#000) (4.5+ is good)
},
toString(), // returns same as `background`
}]
Learn more about color.js Color objects.
FAQs
Small utility to efficiently fetch the colors from an image.
The npm package @11ty/image-color receives a total of 240 weekly downloads. As such, @11ty/image-color popularity was classified as not popular.
We found that @11ty/image-color demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.