Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Pyxpal Color PreviewerNew to Visual Studio Code? Get it now.
Pyxpal Color Previewer

Pyxpal Color Previewer

ryugibo

|
2 installs
| (0) | Free
Provides a color preview for .pyxpal files, showing the color palette directly in the editor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pyxpal Color Previewer

A Visual Studio Code extension that provides interactive color previews, color pickers, and convenient palette tools for .pyxpal color palette files (used in Pyxel retro game engine and custom palette workflows).

Pyxpal Preview Screenshot


Features

  • 🎨 Inline Color Preview & Native Color Picker
    • Displays a color preview box next to each 6-digit HEX color code.
    • Click on the color box to open VS Code's native color picker and adjust colors visually in real time.
  • 📋 One-Click CodeLens Copy
    • Index Number: Displays each line's zero-based palette index (0, 1, 2, ...) above the line. Click to copy the index number to your clipboard.
    • Constant Label: Displays the corresponding constant name (e.g., pyxel.COLOR_BLACK). Click to copy the constant identifier directly into your code.
  • 🐍 Dynamic Python Constants Integration
    • If a .py file with the same name exists in the same directory (e.g., my_palette.py alongside my_palette.pyxpal), the extension automatically parses COLOR_<NAME>: int = <INDEX> declarations and displays the custom constant names as CodeLens labels.
    • If no custom Python file exists, default Pyxel palette constants (pyxel.COLOR_*) are used.
  • ⚠️ Syntax Validation & Diagnostics
    • Automatically highlights invalid lines (empty characters, incorrect length, or non-HEX characters) with warnings to help prevent broken palette entries.

The .pyxpal Format

A .pyxpal file is a simple text file representing a color palette:

  • Each line contains a 6-digit HEX color code without the # prefix (case-insensitive).
  • Empty trailing lines are ignored.

Example (retro.pyxpal):

000000
2C3E50
3498DB
2ECC71
F1C40F
E67E22
E74C3C
ECF0F1

Optional sibling file (retro.py):

COLOR_BACKGROUND: int = 0
COLOR_DARK_SLATE: int = 1
COLOR_RIVER_BLUE: int = 2
COLOR_EMERALD: int = 3
COLOR_SUN_YELLOW: int = 4
COLOR_CARROT: int = 5
COLOR_ALIZARIN: int = 6
COLOR_CLOUDS: int = 7

Usage

  1. Open any file with the .pyxpal extension in VS Code.
  2. Edit color values manually or click the inline color box to pick colors.
  3. Click the CodeLens buttons above each line to copy color indices or constant names.

License

MIT © ryugibo

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft