npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ase-creator

v0.1.0

Published

Simple JavaScript/TypeScript library to create and download Adobe Swatch Exchange (.ase) files.

Downloads

95

Readme

ASE Creator

Simple JavaScript/TypeScript library for creating Adobe Swatch Exchange (.ase) files.

This project was written entirely by Codex and is based on the Python swatch library. Full credit for the original work goes to the swatch project: https://github.com/nsfmc/swatch

Install

npm install ase-creator

Quick start

import { ASE } from 'ase-creator';

const ase = ASE.create({ groupName: 'Brand Palette' })
	.addColor('Primary', '#0066FF')
	.addColor('Secondary', '#FFAA00')
	.addGradient(
		[
			{ hex: '#0066FF', position: 0 },
			{ hex: '#FFAA00', position: 100 },
		],
		{ steps: 6, prefix: 'Blend' },
	);

Export the ASE file

Use one of these once you have an ase instance.

Node.js (write to disk)

import { writeFile } from 'node:fs/promises';

await writeFile('brand-palette.ase', ase.toBytes());

Web (browser download)

ase.download('brand-palette');

Examples

1) One swatch only: Red (#FF0000)

import { ASE } from 'ase-creator';

const ase = ASE.create({ groupName: 'Single Swatch' }).addColor('Red', '#FF0000');

Preview in Adobe apps:

Group: Single Swatch
- Red   #FF0000

2) Three colors with no names provided by the caller

ASE entries require names, so this example auto-generates Color 1, Color 2, Color 3.

import { ASE } from 'ase-creator';

const hexes = ['#FF0000', '#00FF00', '#0000FF'];
const ase = ASE.create({ groupName: 'Three Colors' });

hexes.forEach((hex, index) => {
	ase.addColor(`Color ${index + 1}`, hex);
});

Preview in Adobe apps:

Group: Three Colors
- Color 1   #FF0000
- Color 2   #00FF00
- Color 3   #0000FF

3) Six named colors split across two groups (Warm and Cool)

import { ASE } from 'ase-creator';

const ase = ASE.create({ groupName: 'Warm' })
	.addColors([
		{ name: 'Sunset Orange', hex: '#FF5E3A' },
		{ name: 'Marigold', hex: '#FFB200' },
		{ name: 'Rose', hex: '#E63946' },
	])
	.addGroup('Cool')
	.addColors([
		{ name: 'Ocean', hex: '#0077B6' },
		{ name: 'Mint', hex: '#2EC4B6' },
		{ name: 'Indigo', hex: '#3A0CA3' },
	]);

Preview in Adobe apps:

Group: Warm
- Sunset Orange   #FF5E3A
- Marigold        #FFB200
- Rose            #E63946

Group: Cool
- Ocean           #0077B6
- Mint            #2EC4B6
- Indigo          #3A0CA3

4) Stepped gradient from red to blue (5 steps)

import { ASE } from 'ase-creator';

const ase = ASE.create({ groupName: 'Red to Blue' }).addGradient(
	[
		{ hex: '#FF0000', position: 0 },
		{ hex: '#0000FF', position: 100 },
	],
	{ steps: 5, prefix: 'Step' },
);

Preview in Adobe apps:

Group: Red to Blue
- Step 01 (0%)     #FF0000
- Step 02 (25%)    #BF0040
- Step 03 (50%)    #800080
- Step 04 (75%)    #4000BF
- Step 05 (100%)   #0000FF

API

ASE.create(options?)

Creates a new ASE builder instance.

type ASECreateOptions = {
	groupName?: string;
	colors?: Array<{ name: string; hex: string }>;
};

Instance methods

  • addColor(name, hex) or addColor({ name, hex })
  • addColors(colors)
  • addGroup(name, colors?) creates a new active group
  • addGradient(stops, options?)
  • setGroupName(name) renames the active group
  • clear()
  • toBytes()
  • toArrayBuffer()
  • toBlob()
  • download(filename?) (browser only)

Gradient options

type ASEGradientOptions = {
	steps?: number; // clamped to 2..64, default 7
	prefix?: string; // default "Step"
};

Development

npm install
npm test
npm run build

License

MIT