PAWN Painter is a powerful Visual Studio Code extension designed specifically for SA-MP and open.mp development. It enhances your coding experience by providing advanced color visualization and editing capabilities for various color formats.
- Multiple Color Formats Support:
- Hex format:
0xRRGGBB
and0xRRGGBBAA
- Braced format:
{RRGGBB}
- RGB format:
r, g, b
- RGBA format:
r, g, b, a
- Hex format:
- Real-time Preview of SA-MP/open.mp GameText colors with brightness levels
- Basic colors:
~r~
,~g~
,~b~
,~y~
,~p~
,~w~
,~s~
,~l~
- Multiple brightness levels using
~h~
modifier - Three styling options: text color, underline, or background highlight
- Basic colors:
- Selective Color Highlighting:
- Ignore specific lines from color highlighting
- Multi-line color ignore support
- History view with line preview
- Easy restoration of ignored colors
- Flexible Styling Options:
- Text color (changes the actual text color)
- Underline (colored line under the text)
- Background (colored background behind the text)
- Smart Color Detection:
- Context-aware color parsing
- Enhanced TextDraw function support
- Optimized performance for large files
- Alpha Channel Support:
- Full support for RGBA colors
- Warnings for
00
alpha values - Bitwise operation compatibility
- VS Code Native Color Picker support for all formats
- Inline Color Text Highlighting
- Open Visual Studio Code
- Go to the Extensions view (Ctrl+Shift+X)
- Search for "PAWN Painter"
- Click Install
Alternatively, install directly from the Visual Studio Code Marketplace.
Access settings through VS Code's settings or directly in your settings.json
:
Setting | Description | Default |
---|---|---|
pawnpainter.general.enableColorPicker |
Enable/disable color picker functionality | true |
pawnpainter.hex.enabled |
Enable/disable hex color highlighting | true |
pawnpainter.hex.style |
Highlighting style ("text", "underline", or "background") | "underline" |
pawnpainter.hex.showAlphaWarnings |
Show warnings for colors with alpha value of 00 | true |
pawnpainter.gameText.enabled |
Enable/disable GameText color preview | true |
pawnpainter.gameText.style |
GameText style ("text", "underline", or "background") | "text" |
pawnpainter.inlineText.enabled |
Enable/disable inline color highlighting | true |
pawnpainter.inlineText.codeStyle |
Style for color code itself ("text", "underline", or "background") | "underline" |
pawnpainter.inlineText.textStyle |
Style for text following color code ("text", "underline", or "background") | "text" |
Toggle Hex Color Highlighting
: Enable/disable hex color visualizationToggle Inline Colors
: Enable/disable inline color highlightingToggle GameText Color Preview
: Enable/disable GameText color visualizationToggle Normal Color Picker
: Enable/disable VS Code's native color pickerIgnore Color On Selected Line(s)
: Ignore color highlighting for selected linesRestore Color To Selected Line(s)
: Restore color highlighting to ignored linesClear All Ignored Lines
: Remove all ignored line settingsHistory Of All Ignored Lines
: View and manage ignored lines
// GameText Color Examples
"~r~Red text"
"~r~~h~Lighter red"
"~r~~h~~h~Even lighter red"
"~g~Green text"
"~b~Blue text"
"~y~Yellow text"
"~p~Purple text"
"~w~White text"
"~l~Black text"
// Hex Color Examples
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_ALPHA 0xFF00FF80 // With alpha
// Inline Color Examples
SendClientMessage(playerid, -1, "{FF0000}Red text {00FF00}Green text {0000FF}Blue text");
// RGB Format (TextDraw)
TextDrawColor(text, 255, 0, 0); // Red
TextDrawColor(text, 0, 255, 0); // Green
TextDrawColor(text, 0, 0, 255); // Blue
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have suggestions:
- File an issue on GitHub
This project is licensed under the MIT License - see the LICENSE file for details.
Created and maintained by itsneufox