Skip to content

🎨 Get the closest Catppuccin color... in a REPL?

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING.md
Notifications You must be signed in to change notification settings

uncenter/ctpvert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ctpvert

Get the closest Catppuccin color.

npx ctpvert@latest
pnpm dlx ctpvert@latest
bunx ctpvert@latest

API

import { closest } from "https://deno.land/x/ctpvert/main.ts";

const myTheme = {
	foreground: "#000000",
	background: "#FFFFFF",
	accent: "#00ff00",
};

const catppuccinLatteTheme = Object.fromEntries(
	Object.entries(myTheme).map(([property, color]) => [
		property,
		closest(color)["latte"].hex,
	])
);

console.log(catppuccinLatteTheme);
/* { foreground: "#4c4f69", background: "#eff1f5", accent: "#40a02b" } */

License

MIT

About

🎨 Get the closest Catppuccin color... in a REPL?

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING.md

Stars

Watchers

Forks

Packages

No packages published