GNU General Public License v3.0

项目介绍

joanroig/palette-studio 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 GNU General Public License v3.0 许可证,目前获得 56 个 Star、7 次 Fork。

仓库全名
joanroig/palette-studio
开源许可证
GNU General Public License v3.0
Star 数
56
Fork 数
7

README 摘要

Palette Studio Import, edit, and export palettes across Procreate, Adobe, and GIMP formats. Open Web App • Download Desktop Available for web, Windows, macOS, and Linux Highlights Import .swatches, .ase, .gpl, .aco, .act, .pal, .sketchpalette, .json, .css, .scss, .less, .hex and .txt palettes. Pull a palette out of any image, automatically or by picking points yourself. Generate palettes by style (analogous,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

palette-studio 用什么语言开发?

主要使用 TypeScript 编写,采用 GNU General Public License v3.0 许可证,目前有 56 个 Star。

palette-studio 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 palette-studio 的源码?

可以直接克隆仓库:git clone https://github.com/joanroig/palette-studio.git,默认分支为 main;安装与运行步骤见仓库 README。

palette-studio 最近还在维护吗?

仓库最近一次更新为 8月18日,当前没有未关闭的 Issue;Star 数为 56,可作为社区活跃度的参考。

关于

​🖌️ Cross-platform color palette manager for Procreate (.swatches), Adobe (.ase), CSS, Figma, and more. Import, edit, and export across Web, Desktop, Mobile, and CLI. Formerly "Swatches to ASE".

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
71
价值分
35
活跃状态
活跃

语言占比

HTML
JavaScript
SCSS
TypeScript

Release

README

Logo

Palette Studio

Import, edit, and export palettes across Procreate, Adobe, and GIMP formats.
Open Web App • Download Desktop

Node.js 22.22+ Build and Release Tests Deploy Firebase Hosting Firebase Hosting


Showcase
Available for web, Windows, macOS, and Linux


Highlights

  • Import .swatches, .ase, .gpl, .aco, .act, .pal, .sketchpalette, .json, .css, .scss, .less, .hex and .txt palettes.
  • Pull a palette out of any image, automatically or by picking points yourself.
  • Generate palettes by style (analogous, complementary, triadic, etc.) with optional base colors.
  • Edit colors, rename, reorder by drag-and-drop, and switch between HEX/RGB/HSB/HSL/CMYK/LAB views.
  • Export single or batch palettes to ASE, Swatches, and GIMP GPL (zip downloads for multi-export).
  • Quick exports for PNG, PDF, CSS variables, Tailwind config, SVG, JSON, and embed snippets.
  • Share palettes via URL (Coolors, X, Pinterest) and import from shared links.
  • Preferences and palettes are stored locally in the browser/desktop app.

Example

Go to the examples folder to see some converted palettes like this one:

source palette
Source palette

converted palette
Converted palette imported in Photoshop

GUI (Web + Desktop)

The project now includes a cross-platform GUI that runs in the browser (Firebase Hosting) and as a desktop app for Windows, macOS, and Linux.

Web

  • Install dependencies with npm install.
  • Start the dev server with npm run dev:web.
  • Build a static site with npm run build:web (output: dist-web).
  • Preview the static build with npm run preview:web.
  • Upload palette files (.swatches, .ase, .gpl, .aco, .act, .pal, .sketchpalette, .json, .css, .scss, .less, .hex, .txt) or an image to take the colors from.
  • Generate new palettes, edit names/colors, and reorder swatches.
  • Export single palettes or batch export as ASE/Swatches/GPL.
  • Use quick exports for images, PDF, CSS, Tailwind, SVG, JSON, embed snippets, or share URLs.

Deploy (Firebase Hosting)

Use the Firebase CLI to deploy the web build without GitHub Actions. The repo is already configured for Hosting in firebase.json (public dir: dist-web).

  1. Install the Firebase CLI once: npm install -g firebase-tools.
  2. Authenticate: firebase login.
  3. Link this repo to a Firebase project.
  4. Build the web assets: npm run build:web.
  5. Deploy Firestore rules and Hosting: firebase deploy --only firestore:rules,hosting.

Project linking options:

  1. Create a local alias file: firebase use --add (creates .firebaserc).
  2. Or deploy with an explicit project each time: firebase deploy --project <PROJECT_ID> --only firestore:rules,hosting.

Optional local preview:

  1. Build the web assets: npm run build:web.
  2. Serve the Hosting build locally: firebase serve --only hosting.

Multiple Hosting targets (staging/testing/production):

Use Firebase Hosting targets to map additional sites to this repo. Example for a production target:

firebase target:apply hosting production palettes
firebase deploy --only hosting:production

Firebase Sync + Discovery (Free Tier)

Palette Studio can sync palettes between devices, publish public palettes, and show a discovery feed using Firebase Auth + Firestore (Spark/free tier).

  1. Create a Firebase project (Spark plan) and add a Web app.
  2. Enable Authentication → Sign-in method → Google (and optionally add your support email).
  3. Create a Firestore database in production mode.
  4. Copy the Firebase config into web/.env using web/.env.example as a guide:
    VITE_FIREBASE_API_KEY=...
    VITE_FIREBASE_AUTH_DOMAIN=...
    VITE_FIREBASE_PROJECT_ID=...
    VITE_FIREBASE_APP_ID=...
    VITE_FIREBASE_STORAGE_BUCKET=...
    VITE_FIREBASE_MESSAGING_SENDER_ID=...
    VITE_FIREBASE_APP_CHECK_KEY=... (optional)
    
  5. Restart the dev server or rebuild the app.

Optional: GitHub Actions secrets Add the same VITE_FIREBASE_* keys as repository secrets to ensure builds deploy with Firebase enabled (for hosting and releases).

The deployment workflow also requires a FIREBASE_SERVICE_ACCOUNT repository secret containing the complete JSON key for a service account with Firebase Hosting Admin and Firebase Rules Admin access to the project.

Recommended Firestore rules Use rules that only allow authenticated users to read/write their own sync document, and allow public palettes to be read by anyone while restricting writes to their owners. The repo now includes a hardened baseline in firestore.rules with per-user access, size limits, and simple rate limits.

Deploy firestore.rules before shipping a client whose sync payload has changed: firebase deploy --only firestore:rules. The GitHub deployment workflow does this before publishing Hosting; its service account therefore needs the Firebase Rules Admin role (roles/firebaserules.admin) in addition to its Hosting permissions.

Android (Capacitor)

Palette Studio can be wrapped as an Android app using Capacitor:

  1. Build the web app: npm run build:web
  2. Add Android once: npx cap add android
  3. Sync web assets: npm run build:android
  4. Open Android Studio: npm run open:android

Be sure to register the Android app in Firebase and add the generated google-services.json to the Android project when you enable sync.

Firebase security and key restrictions

To ensure only this app can talk to Firebase:

  • Restrict API keys in Google Cloud Console → APIs & Services → Credentials.
    • For web: restrict HTTP referrers to your production domains.
    • For Android: restrict by package name and SHA-1 certificate fingerprints.
  • Enable App Check with reCAPTCHA v3 (web) and Play Integrity (Android) to stop unauthorized clients.
    • Web uses VITE_FIREBASE_APP_CHECK_KEY (reCAPTCHA v3 site key).
    • Electron/desktop needs a custom App Check provider if you plan to enforce App Check on Firestore.
  • Lock down Firestore rules (see above) and avoid public write access.
  • Rotate keys if you suspect leakage and keep .env out of version control.

Desktop

  • Run npm run dev:desktop to launch the Electron app with hot reload.
  • Build the desktop bundle with npm run build:desktop (outputs: dist-electron, dist-web).
  • Build installers with npm run dist:desktop (outputs: release).
  • Desktop mode uses the same drag-and-drop workflow and saves zip exports via a native dialog.

Code signing (recommended) Configure CI signing secrets so releases are signed on Windows/macOS:

  • Windows: WIN_CSC_LINK, WIN_CSC_KEY_PASSWORD
  • macOS: MAC_CSC_LINK, MAC_CSC_KEY_PASSWORD, APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID

CLI

Be sure to have Node.js 22.22+ installed, then:

  • Download or clone the repo.
  • Run npm install in the root folder to install dependencies.
  • Add your palette files in the palette-in folder. Anything the app reads works here: .swatches, .ase, .gpl, .aco, .act, .pal, .sketchpalette, .json, .css, .scss, .less, .hex and .txt.
  • Run npm run convert to convert the palettes into the formats you choose.
  • The converted files should be in the palette-out folder.

Configuration (CLI)

The input/output folders, color naming, and optional black & white colors can be changed in: config.json

Configuration parameters

  • inFolder: folder used to read the palette files.
  • outFolder: folder used to output the converted palettes.
  • outFormats: output formats as an array or comma-separated string. Use ase, swatches, gpl, or all. Defaults to ase.
  • colorNameFormat: sets the collection of color names to be used. Available namings are: roygbiv, basic, html, x11, pantone, ntc. See color namer for reference.
  • addBlackWhite: if true, two extra colors will be added:

converted palette
Converted palette with extra black and white colors imported in Photoshop

Tests

  • Run unit tests with npm test.
  • Run coverage with npm run test:coverage.
  • Run GUI tests with npm run test:gui (installs Playwright as needed).

Credits

Source of the provided palettes:

https://bardotbrush.com/procreate-color-palettes/

Libraries used

评论

暂无评论