1. Overview & Purpose
The neoColor plugin provides custom color picker controls and advanced color mathematics for VisualNEO Win developers.
It handles color format conversions (HEX, RGBA, HSLA, HSV, Delphi TColor), alpha blending calculations, WCAG 2.1 contrast accessibility analysis, screen color sampling (eyedropper), and harmonic palette generation (analogous, complementary, triadic, monochromatic, shades).
2. Custom Control Properties
Control: neoColor Picker (neo-color-picker)
| Property Name | Type | Default Value | Description |
|---|---|---|---|
color | string | "#3498DBFF" | Initial active color in #RRGGBBAA format. |
format | string | "hex" | Display value format ("hex", "rgba", "hsla", "hsv"). |
theme | string | "dark" | Picker visual theme ("dark" or "light"). |
palette | string | "analogous" | Default harmonic palette preview preset. |
showAlpha | boolean | true | Enables or disables the alpha transparency channel slider bar. |
3. Actions & Commands Reference
neoColorConvert
Converts a color code between formats (HEX, RGBA, HSLA, HSV, Delphi TColor).
- Command Syntax:
neoColorConvert "ColorCode" "TargetFormat" - Result Variable:
[neoColorResult]receives converted color representation.
neoColorBlend
Blends a foreground color with alpha channel over a background color.
- Command Syntax:
neoColorBlend "BgColor" "FgColor"
neoColorGetPalette
Generates a harmonic palette of $N$ colors based on a base starting color.
- Command Syntax:
neoColorGetPalette "BaseColor" "PaletteType" "Count"
neoColorGetContrast
Calculates WCAG 2.1 contrast ratio and returns suggested readable text color (#000000FF or #FFFFFFFF).
- Command Syntax:
neoColorGetContrast "Color1" "Color2"
neoColorPickScreen
Captures the pixel color directly under the screen mouse cursor into [neoColorResult].
- Command Syntax:
neoColorPickScreen
neoColorPickerSetColor
Sets the active selected color of a neoColor Picker control programmatically.
- Command Syntax:
neoColorPickerSetColor "ObjectName" "ColorCode"
neoColorPickerGetColor
Retrieves the active selected color of a neoColor Picker control into [neoColorResult].
- Command Syntax:
neoColorPickerGetColor "ObjectName"
4. Events Reference
change: Fires continuously in real-time as the user drags sliders or changes color.select: Fires when the user finishes their selection.
5. Practical Usage Example (VisualNEO Win Script)
. --- Convert HEX to RGBA ---
neoColorConvert "#FF5722FF" "rgba"
SetVar "[RgbaResult]" "[neoColorResult]"
. --- Calculate WCAG contrast against dark blue background ---
neoColorGetContrast "#0F172A" "#38BDF8"
SetVar "[ContrastInfo]" "[neoColorResult]"
. --- Sample screen pixel color ---
neoColorPickScreen
SetVar "[PickedPixelColor]" "[neoColorResult]"