- The
ColorGridcontrol now will now automatically scale color cells if the application is displayed with high DPI
- The protected
SelectionGlyph,Points,LockUpdatesandColorsproperties of theColorWheelcontrol are deprecated and will be removed in a subsequent updated.
- The
ColorWheelno longer automatically snaps to the center of the wheel when the mouse is approaching the center
- Added new
ShowColorSpaceLabelsproperty to theColorEditorcontrol. Whenfalse, the RGB and HSL labels will be hidden, allowing the control to take up less space. The default value istrue - Added new
CellContextMenuStripproperty to theColorGridcontrol, allowingContextMenuStripcontrols to be automatically displayed when context clicking (including keyboard hotkeys) color cells - Added new
GetCellBoundsmethod to theColorGridcontrol, allowing consumers to get theRectanglebounds of a color cell for purposes such as displaying context menus separately from the above support
- Reworked
ColorEditorreszing handling so it doesn't look quite as awful if the control is small
Paletteproperty of theColorGridcontrol wasn't initialized correctly, making it pretty difficult to have a blank palette
- Merged non-destructive changes from the version 2 branch, mainly around reworking events to require less overhead
- Added
MinimumandMaximumproperties toIPaletteSerializerto provide hints to hosting applications about valid palettes - Added support for reading and writing Adobe Color Table files (
*.act) via the newAdobeColorTablePaletteSerializerclass
- Code refactored using C# 6 syntax
- Fixed rounding errors that could occur when using
HslColor.ToRgbColor. Thanks to Jürgen from Iconshow for this post - Attempting to set the
Colorsproperty of theColorGridtonullnow throws an exception
- Added a new demonstration which shows how to host a
ColorGridcontrol in aToolStrip. More details on this can be found on cyotek.com. - Added new
PreviewColorChangedevent to theColorPickerDialog - Added new
PaintColorprotected methods to theColorWheelcontrol allowing additional hotspots to be painted - Added new constructor to the
ColorCollectionto copy the contents of anotherColorCollection - The
ColorGridcontrol now to defaults to creating 16 custom colours instead of 32 - Fixed an issue where the
ColorGridcontrol wasn't rendering the custom colours group correctly (regression from previous version). Thanks to Michael Schwarz for pointing out the offending line of code - Fixed an issue where the
ColorPickerDialogdisplayed non-opaque colours when theShowAlphaChannelproperty wasfalse - Fixed an issue where the
ColorEditorcontrol would allow you to enter an 8 character hex color and thus set an alpha channel even if theShowAlphaChannelproperty wasfalse
- Fixed an issue where
GimpPaletteSerializer.Deserializecould get itself stuck in an infinite loop if a GPL file was formatted a certain way GimpPaletteSerializer.Serializenow usesASCIIencoding instead ofUTF-8, fixing a problem where palette files couldn't be opened in Inkscape.
- Added new
AdobePhotoShopColorSwatchSerializerserializer for reading and writing Adobe PhotoShop colour swatches (both version 1 and version 2) - You can now set the
Columnsproperty of aColorGridcontrol to0, which will then internally calculate columns based on the size of the control, the cell size, and the spacing. A new read-onlyActualColumnsproperty has been added which will allow you to get the real number of columns if required. TheAutoSizebehaviour has been changed so that only the vertical height of the control is adjusted whenColumnsis zero - Save Palette button in the
ColorPickerDialognow obtains the serializer to use based on the selected filter index, allowing correct saving if multiple serializers use the same extension. - Added
CanReadFrommethod toIPaletteSerializer. PaletteSerializer.GetSerializernow makes use of the above new method to access the relevant serializer rather than just matching extensions. This means if you have two serializers that support different .pal formatted files, these can now be loaded successfully, instead of one loading and one failing.- Added new
RawPaletteSerializerwhich reads and writes palettes that are simply RGB triplets in byte form - Added new
ShowAlphaChannelproperty toColorEditorandColorPickerDialog. This property allows the alpha channel editing controls to be hidden, for when working with 8-bit colours. - The rendering of the selected cell in a
ColorGridcontrol who'sSelectedCellStyleisZoomednow usesPadding.LeftandPadding.Topto determine the size of the zoom box, avoiding massive boxes the larger theCellSizegets. - Added a new standard 256 colour palette. You can use this in the
ColorGridby setting thePaletteproperty toColorPalette.Standard256or obtain the array of colours by callingColorPalettes.StandardPalette ColorGridandRgbaColorSlidercontrols now only create transparency brushes when required. A new virtual methodSupportsTransparentBackColorallows inheritors to create their own brushes if required.- Added
EditingColorevent toColorGrid, allowing the edit colour action to be cancelled, or replaced with a custom editor - Added
CurrentCellproperty andGetCellOffsetmethods to theColorGrid. ColorCollectionnow implementsIEquatable- Added more tests
- Added new
Navigatemethod toColorGridfor easier moving within the cells of the grid
- The
ColorGridcontrol now tries to be smarter with painting, and only paints cells that intersect with the clip rectangle. In addition, where possible only individual cells are invalidated rather than the entire control. - Corrected invalid error messages from the Save Palette button in the
ColorPickerDialog. - Load Palette and Save Palette buttons in the
ColorPickerDialognow check theCanReadandCanWriteproperties of the serializer. - Double clicking with any button other than the left in
ColorGridcontrol no longer attempts to initiate colour editing - Setting the
Colorproperty of theColorGridcontrol toColor.Emptyno longer treats the value as a valid colour - The
ColorGridcontrol no longer defines custom colour regions when theShowCustomColorsproperty wasfalse. This manifested in hover and selection effects working if you moved your mouse over the bottom of a resized grid. - Clicking "white space" areas of a
ColorWheelcontrol will no longer incorrectly set the colour to the closest matching point on the wheel itself. However, starting to select a colour within the wheel and then moving outside the bounds will continue to select the closest match as usual. - Fixed a crash that occurred when creating controls that inherited from
ColorGridorRgbaColorSlider - When the
AutoAddColorsandShowCustomColorsproperties arefalse, unmatched colours will no longer be silently added to theColorGridcustom palette unexpectedly. This also resolves various crashes after the colour regions fix above was applied. - The
ColorWheelcontrol now makes use ofButtonRenderer.DrawParentBackgroundto draw itself, to avoid ugly blocks of solid colours when hosted in containers such as theTabControl - The
ColorEditorManagercontrol'sColorChangedevent has now been marked as the default event, so when you double click the component in the designer, a code window now correctly opens. - If the underlying entry in a
ColorCollectionbound to aColorGridcontrol was modified, and this particular entry was the selected colour, theColorGridwould not keep itsColorproperty in sync and would clear the selected index. - Attempting to set the
Columnsproperty to less than zero now throws anArgumentOutOfRangeexception rather than setting it, then crashing later on - Double clicking a colour in the grid of the
ColorPickerDialogno longer opens another copy of theColorPickerDialog - Fixed problems in the
ColorGridwith keyboard navigation and initial focus if no valid colour index was set. - The
ColorCollection.Findmethod now correctly works when adding named colours (e.g.Color.CornflowerBlue) to the collection, but searching by ARGB value (e.g.Color.FromArgb(100, 149, 237)) - Fixed an issue where if the internal dictionary lookup in
ColorCollectionclass had been created and the collection was then updated, in some cases the lookup wasn't correctly modified.
- Added
Findmethod toColorCollection - Replaced
ColorComparer.Brightnesswith version derived from here - Added new
InterleavedBitmapPaletteSerializerclass, that allows palettes to be loaded from ILBM (IFF Interleaved Bitmap) format files (LBM images or BBM palettes). Note: Writing is not yet supported. - Added
CanReadandCanWriteproperties toIPaletteSerializerto indicate input/output support. - The
PaletteSerializer.DefaultOpenFilterandPaletteSerializer.DefaultSaveFiltermake use of the above properties when building filters - Added the ability for multiple extensions to be supplied.
- The colours displayed in the drop down list component of the
ColorEditornow only load when the drop down is opened, or the Up, Down, Page Up or Page Down keys are pressed - Reworked the
ColorEditorcontrol to work nicer with RGB colours. Previously, theColorproperty was a wrapper around theHslColorproperty, meaning if you set it to a named colour such asColor.Red, the name was lost, and the hex/name editor didn't show the name. Now it keeps track of both colours, so if you set it to a named value, you can see (and get) the named value back. - Reworked the
ColorEditorManagercomponent to also store separate copies of the RGB/HSL colours instead of loosing named colour information - Experimented with making the
hex/named colourfield in theColorEditorcontrol slightly wider than the other controls. Looks a touch odd now that all fields aren't a uniform width, but does make it much easier to read that the selected colour isLightGoldenRodYellow!
- Setting the
SelectionSizeproperty of theColorWheeldidn't resize the wheel as it was supposed to - When the orientation of a
ColorSlider(or derived control) wasVertical, the colour bar was drawn in the reverse order of the scale. - Changing the
Valueof theLightnessColorSlidercontrol now correctly updates theColorproperty of that control, in turn making theColorEditorManagerchange the luminosity of linked controls. Also setting theColorof theLightnessColorSlidernow correctly updates theValue. This now means you can bind aColorWheelto aLightnessColorSliderfor full control over the brightness of a colour, which is not possible to do with the wheel alone.
- Added static
LoadPaletteand instanceLoadmethods toColorCollection - Added
Savemethod toColorCollection - Added new constructor to
ColorCollectionthat accepts aSystem.Drawing.Imaging.ColorPaletteclass. - Added new
AutoFitproperty to theColorGrid. When set, theCellSizeproperty is automatically calculated based on the size of the control, and its contents. You can't combineAutoFitwithAutoSize. ColorCollectionis now clone-able
- Removed unnecessary
UpdateStylescalls. - Fixed a problem if a window was opened by pressing
Enter, and aColorGridwas the first focusable control on the new window, the pop-up colour editing dialog would be activated, regardless of theColorGrid's editing settings
- Added
NameandDefaultExtensionproperties toIPaletteSerializer - Added new static properties
DefaultOpenFilterandDefaultSaveFilter, and static methodGetSerializertoPaletteSerializer. These allow the use of reflection for easily providing palette load and save functionality automatically based on loaded assemblies. - Added the
SupportsTransparentBackColorcontrol style toColorGrid - Added system colours to the
ColorEditornamed colour drop down - Added a new
DoubleSoftcell border style to theColorGrid
- Setting the
SpacingorCellSizeproperties of theColorGridcontrol didn't recalculate the layout ColorEditornow usesTextRenderer.DrawTextinstead ofGraphics.DrawStringso all text is rendered consistently.
- Added new constructor to the
ColorCollectionclass that accepts anIEnumerable<int> ColorCollectionnow implementsIClonable- Added dotted outline to design time
ColorGridcontrol
- Fixed invalid default value for the
EditModeproperty of aColorGrid - Fixed
AutoSizeproperty ofColorGridcontrol not being persisted
Note: Several of the updates in this version are breaking changes due to renaming of classes and enum values. Some more changes to your code will be required to use the new Color Picker API.
IPaletteReaderreplaced withIPaletteSerializerJascPaletteReaderreplaced withJascPaletteSerializerGimpPaletteReaderreplaced withGimpPaletteSerializerPaintNetPaletteReaderreplaced withPaintNetPaletteSerializer- The values of the
ColorEditingModeenum have been renamed to make more sense. - The
ColorEditornow supports selecting of named colours as the hex editor is now a drop down list. As well as being able to select named colours from the list, you can now also type names directly into the hex editor and they will be processed accordingly. - The
ColorPickerDialognow can load and save palette files - Palette support has been reworked to allow the saving of palettes as well as loading. Unfortunately due to the initial names of these classes this is a breaking change.
- Added a bit more documentation
- Corrected some grammatical errors in existing documentation and headers
Note: Several of the updates in this version are breaking changes due to renaming of classes and enum values. Some more changes to your code will be required to use the new Color Picker API.
- Added
GimpPaletteReaderfor reading palette files created by Gimp - Added
ReadPalette(fileName)overload toIPaletteReader - Renamed
Jasc10PaletteReadertoJascPaletteReader - Reworked Jasc palette import to match how Gimp is doing it
- Added a testing project. Currently this just tests the different palette readers are importing data correctly.
- Initial Release