explaingit

amancini/delphicolorpreview

Analysis updated 2026-05-18

19PascalAudience · developerComplexity · 2/5Setup · easy

TLDR

A Delphi IDE plugin that shows inline color swatches in the code editor gutter and lets you click to change a color literal in place.

Mindmap

mindmap
  root((DelphiColorPreview))
    What it does
      Shows gutter color swatches
      Lets you edit colors inline
      Supports VCL and FMX
    Tech stack
      Pascal
      Delphi
      RAD Studio
    Use cases
      Preview colors while coding
      Edit colors via picker
      Handle VCL and FMX formats
    Audience
      Delphi developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

See a live color preview next to every color literal while editing Delphi code.

USE CASE 2

Shift+click a gutter swatch to change a color value without hand-editing hex or RGB code.

USE CASE 3

Handle both VCL and FMX color formats, including transparency, in the same editor session.

What is it built with?

PascalDelphiRAD StudioVCLFMX

How does it compare?

amancini/delphicolorpreviewthaddy/kol4tmssoftware/datamodeler
Stars191721
LanguagePascalPascalPascal
Setup difficultyeasymoderate
Complexity2/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires RAD Studio 12 Athens or newer, not compatible with Delphi 11 or earlier.

In plain English

DelphiColorPreview is a plugin for the RAD Studio Delphi IDE that shows a small color swatch right in the editor gutter next to any line of code containing a color value, similar to the inline color hints VS Code shows in its editor. Shift clicking a swatch opens a color picker, and choosing a new color rewrites that literal directly in your source code, in whatever format it was originally written. It understands the many ways Delphi code can express a color: named constants used by the classic VCL framework, the newer FMX framework's constants that include transparency, RGB function calls, several styles of hex color codes, web style hex strings inside quotes, and even plain decimal numbers, but only when they are being assigned directly to something whose name ends in Color, to avoid mistaking an ordinary number like a size or a loop count for a color. Because a bare hex code or a bare decimal number can be read in more than one byte order depending on which framework is being used, the plugin either figures out the right interpretation automatically by looking at the file's imports, or lets you pick and remembers your choice. Colors with transparency are shown blended over a checkerboard so you can actually see through them, and the color picker itself matches whichever light or dark theme the IDE is using. The plugin only works with RAD Studio 12 Athens or newer, because it relies on a code editor notification system Embarcadero introduced in that version, and it does not work with Delphi 11 or earlier. It is installed by opening the project file in the IDE, building it, and installing it as a design time package through the Project Manager, or by running an included batch file from the command line. Once installed, no menus or toolbars are needed. The swatches simply appear, and editing goes through the IDE's normal editor buffer, so changes made through the color picker can be undone with Ctrl+Z like any other edit.

Copy-paste prompts

Prompt 1
Walk me through building and installing DelphiColorPreview as a design time package in RAD Studio.
Prompt 2
Explain how DelphiColorPreview decides whether a hex color literal is VCL or FMX format.
Prompt 3
Why does DelphiColorPreview only recognize decimal color literals when assigned to a *Color target?
Prompt 4
How do I switch the byte order mode between Auto, BGR, and RGB for 6-digit hex colors?

Frequently asked questions

What is delphicolorpreview?

A Delphi IDE plugin that shows inline color swatches in the code editor gutter and lets you click to change a color literal in place.

What language is delphicolorpreview written in?

Mainly Pascal. The stack also includes Pascal, Delphi, RAD Studio.

How hard is delphicolorpreview to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is delphicolorpreview for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.