Environment: VC6 SP5, W2K SP3
This addin supports one command: ColorSelectorCommand. The addin shows a standard ColorSelect dialog and forms text that looks like an RGB-macro string (RGB(100, 120, 130)). Before the dialog is shown, the addin checks the current selection. If the selection starts with “RGB,” the current color in the dialog will be set to those RGB values.
Gert-Jan de Vos has decided to add some features:
- The selector now provides a choice for RGB(), hex, or HTML format color output—(RGB(255, 128, 64), 0x4080FF, #FF8040)
- It recognises any of the supported formats in the source.
- It recognises input if the cursor is anywhere in the color text.
- It adds a toolbar button.
The addin became much better after its additions. I only have changed a little RGB-processing and have added a check on hex-values. Now the addin also can processes strings of the RGB(0xFF, 0x80, 0x40) kind.
Also, I have added a function “pipette” to define the color of a point in any place on the screen.
Note: For definition of color outside Windows’ Visual Studio, it is necessary to hold down the left mouse button.