パッケージの詳細

@catppuccin/palette

catppuccin9.7kMIT1.7.1

Soothing pastel themes for the high-spirited!

readme

Logo
Catppuccin Palettes

Usage

Node

The library is available on npm:

npm install @catppuccin/palette
import { flavors, flavorEntries, version } from "@catppuccin/palette";
import chalk from "chalk";

// a string containing the version of the library
console.log(version);

// an object containing all catppuccin flavors
console.log(flavors);

// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
  console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
  console.log(`It has ${flavor.colorEntries.length} colors:`);

  // same for the colors
  flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
    console.log(
      chalk.bgRgb(rgb.r, rgb.b, rgb.g)(` ${hex} `),
      colorName,
      accent
    );
  });
  console.log("\n");

  // same for the ansi colors
  flavor.ansiColorEntries.map(([colorName, ansi]) => {
    console.log(
      chalk.hex(ansi.normal.hex)(`[${ansi.normal.code}] Normal ${colorName}`)
    );
    console.log(
      chalk.hex(ansi.bright.hex)(`[${ansi.bright.code}] Bright ${colorName}`)
    );
  });
});

Deno

The library is available through JSR and deno.land/x/catppuccin:

import {
  flavors,
  flavorEntries,
  version,
} from "https://deno.land/x/catppuccin/mod.ts";
import { bgRgb24 } from "https://deno.land/std/fmt/colors.ts";

// a string containing the version of the library
console.log(version);

// an object containing all catppuccin flavors
console.log(flavors);

// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
  console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
  console.log(`It has ${flavor.colorEntries.length} colors:`);

  // same for the colors
  flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
    console.log(bgRgb24(`  ${hex}  `, { ...rgb }), colorName, accent);
  });
  console.log("\n");
});

Other available formats

Graphics editors

Please use the respective files in the latest GitHub Release:

Programs Directory
Adobe Suite, Affinity Suite, Sip ase/
Aseprite, Gimp, Inkscape, Krita gimp/
Procreate procreate/
Apple Color List (.clr) clr/

 

Copyright © 2021-present Catppuccin Org

更新履歴

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.7.1 (2024-11-02)

Bug Fixes

  • ansi: better names for normal and bright objects (#112) (251f6a2)

1.7.0 (2024-11-02)

Features

1.6.0 (2024-11-01)

Features

  • ansi: add name and order keys (#106) (2fa1506)
  • ansi: add name key to normal & bright objects (#108) (bc3215e)

1.5.0 (2024-10-26)

Features

Build system & distribution

  • switch to npm: specifiers for Renovate (#99) (6632482)

1.4.0 (2024-09-21)

Features

  • add version key into palette.json (#91) (e76a60a)
  • palettes: prefix filenames with "Catppuccin" (#92) (cf765d2)

Documentation

  • README: add version into the examples (#95) (cf9cb5c)

1.3.0 (2024-09-08)

Features

  • add support for apple color list / .clr files (#87) (88e2795)

Documentation

1.2.0 (2024-05-17)

Features

1.1.1 (2024-03-25)

Documentation

Build system & distribution

1.1.0 (2024-02-12)

Features

Documentation

1.0.3 (2024-01-02)

Bug Fixes

  • types: use singular for color name types (#67) (7c73188)

1.0.2 (2024-01-02)

Bug Fixes

  • types: add accent/monochromatic color name types (#65) (3d415e7)

1.0.1 (2023-12-29)

Bug Fixes

Build system & distribution

  • distribute palette as zip file as well (#60) (1ce383c)

1.0.0 (2023-12-28)

⚠ BREAKING CHANGES

  • complete rewrite (#49)

Features

Bug Fixes

0.2.0 (2023-07-10)

Features

Bug Fixes

0.1.8 (2023-04-02)

Features

0.1.7 (2023-03-03)

Bug Fixes

  • expose scss files in package.json 'exports' (#43) (0bc8247)