- Added
Lightness
property to theColorWheel
control, used to set the lightness of the generated color and to avoid resetting of lightness when using theColorEditorManager
- Added
Alpha
property to theColorWheel
control, used to set the alpha channel of the generated color and to avoid resetting of alpha when using theColorEditorManager
- Added
DisplayLightness
property to theColorWheel
control. When set, the wheel is drawn using the specified lightness, otherwise it draws the wheel at 50% (default) - Added
ShowSaturationRing
,ShowCenterLines
,LineColor
,ShowAngleArrow
,SecondaryColors
andSecondarySelectionSize
properties to theColorWheel
control - Added
ScreenColorPicker.CaptureMouse
andReleaseMouse
methods. These allow you to initiate a screen picker operation without having to click and drag in the source control, for example via hotkey - Added
ScreenColorPicker.Selecting
andSelected
events, allowing you to know when a selection operation starts and ends - Added
ColorSlider.NubOutlineColor
- Added
PreserveAlphaChannel
,ShowLoad
,ShowSave
andCustomColors
properties to theColorPickerDialog
component - Added
CustomColorsLoading
andCustomColorsSaving
events to theColorPickerDialog
component - Added
ColorEditor.PreserveAlphaChannel
. By default, theColorEditor
will strip the alpha component from a colour if theShowAlphaChannel
property is not set. This new property allows the component to be preserved - Added
ColorEditor.ShowHex
,ShowHsl
andShowRgb
properties for showing or hiding groups of editors - Added the
ColorEditor.NubSize
,NubColor
andNubOutlineColor
to allow at least some customisation of the sliders
- Added dedicated targets for .NET 3.5, .NET 4.0, .NET 4.5.2, .NET 4.6.2,.NET 4.7.2, .NET 4.8, .NET 5.0 and .NET Core 3.1
- Focus rectangles in slider controls now use an inverse painting operation
- Drag handles in the slider controls are no longer fully outside the bar, but are half inside and half out
- The
Up
,Down
,Home
andEnd
keys are now used to manipulate the saturation value when aColorWheel
control has focus
- The
IPaletteSerializer
andIColorEditor
interfaces have been marked as obsolete - The
PaletteSerializer
,AdobeColorTablePaletteSerializer
,AdobePhotoShopColorSwatchSerializer
,GimpPaletteSerializer
,InterleavedBitmapPaletteSerializer
,JascPaletteSerializer
,PaintNetPaletteSerializer
, andRawPaletteSerializer
classes have been marked as obsolete - The
AdobePhotoshopColorSwatchColorSpace
andAdobePhotoshopColorSwatchFileVersion
enums have been marked as obsolete
- The method
ColorEditor.ResizeComponents
is no longer accessible
- The method
HslColor.ToRgbColor
didn't convert colours properly, most visible in theLightnessColorSlider
which always showed a black and white scale no matter what the base color was - Changing the
LightnessColorSlider.Value
property no longer updates theColor
property - The
ColorManagerEditor
does a better job of syncing values between attached controls - The
SaturationColorSlider
andLightnessColorSlider
controls now display a checker box background for non-solid colours - The
ColorGrid
control wasn't binding events for the defaultColors
andCustomColors
property values, causing programmatic changes not to be reflected in the control or crashes trying to access values not present - Calling
ColorGrid.EndUpdate
didn't perform layout operations if the total number of colours had changed whiles updating was disabled
- The
ColorGrid
control now will now automatically scale color cells if the application is displayed with high DPI
- The protected
SelectionGlyph
,Points
,LockUpdates
andColors
properties of theColorWheel
control are deprecated and will be removed in a subsequent update
- The
ColorWheel
no longer automatically snaps to the center of the wheel when the mouse is approaching the center
- Added new
ShowColorSpaceLabels
property to theColorEditor
control. Whenfalse
, the RGB and HSL labels will be hidden, allowing the control to take up less space. The default value istrue
- Added new
CellContextMenuStrip
property to theColorGrid
control, allowingContextMenuStrip
controls to be automatically displayed when context clicking (including keyboard hotkeys) color cells - Added new
GetCellBounds
method to theColorGrid
control, allowing consumers to get theRectangle
bounds of a color cell for purposes such as displaying context menus separately from the above support
- Reworked
ColorEditor
reszing handling so it doesn't look quite as awful if the control is small
Palette
property of theColorGrid
control 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
Minimum
andMaximum
properties toIPaletteSerializer
to provide hints to hosting applications about valid palettes - Added support for reading and writing Adobe Color Table
files (
*.act
) via the newAdobeColorTablePaletteSerializer
class
- 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
Colors
property of theColorGrid
tonull
now throws an exception
- Added a new demonstration which shows how to host a
ColorGrid
control in aToolStrip
. More details on this can be found on cyotek.com. - Added new
PreviewColorChanged
event to theColorPickerDialog
- Added new
PaintColor
protected methods to theColorWheel
control allowing additional hotspots to be painted - Added new constructor to the
ColorCollection
to copy the contents of anotherColorCollection
- The
ColorGrid
control now to defaults to creating 16 custom colours instead of 32 - Fixed an issue where the
ColorGrid
control 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
ColorPickerDialog
displayed non-opaque colours when theShowAlphaChannel
property wasfalse
- Fixed an issue where the
ColorEditor
control would allow you to enter an 8 character hex color and thus set an alpha channel even if theShowAlphaChannel
property wasfalse
- Fixed an issue where
GimpPaletteSerializer.Deserialize
could get itself stuck in an infinite loop if a GPL file was formatted a certain way GimpPaletteSerializer.Serialize
now usesASCII
encoding instead ofUTF-8
, fixing a problem where palette files couldn't be opened in Inkscape.
- Added new
AdobePhotoShopColorSwatchSerializer
serializer for reading and writing Adobe PhotoShop colour swatches (both version 1 and version 2) - You can now set the
Columns
property of aColorGrid
control to0
, which will then internally calculate columns based on the size of the control, the cell size, and the spacing. A new read-onlyActualColumns
property has been added which will allow you to get the real number of columns if required. TheAutoSize
behaviour has been changed so that only the vertical height of the control is adjusted whenColumns
is zero - Save Palette button in the
ColorPickerDialog
now obtains the serializer to use based on the selected filter index, allowing correct saving if multiple serializers use the same extension. - Added
CanReadFrom
method toIPaletteSerializer
. PaletteSerializer.GetSerializer
now 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
RawPaletteSerializer
which reads and writes palettes that are simply RGB triplets in byte form - Added new
ShowAlphaChannel
property toColorEditor
andColorPickerDialog
. 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
ColorGrid
control who'sSelectedCellStyle
isZoomed
now usesPadding.Left
andPadding.Top
to determine the size of the zoom box, avoiding massive boxes the larger theCellSize
gets. - Added a new standard 256 colour palette. You can use this in
the
ColorGrid
by setting thePalette
property toColorPalette.Standard256
or obtain the array of colours by callingColorPalettes.StandardPalette
ColorGrid
andRgbaColorSlider
controls now only create transparency brushes when required. A new virtual methodSupportsTransparentBackColor
allows inheritors to create their own brushes if required.- Added
EditingColor
event toColorGrid
, allowing the edit colour action to be cancelled, or replaced with a custom editor - Added
CurrentCell
property andGetCellOffset
methods to theColorGrid
. ColorCollection
now implementsIEquatable
- Added more tests
- Added new
Navigate
method toColorGrid
for easier moving within the cells of the grid
- The
ColorGrid
control 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
ColorPickerDialog
now check theCanRead
andCanWrite
properties of the serializer. - Double clicking with any button other than the left in
ColorGrid
control no longer attempts to initiate colour editing - Setting the
Color
property of theColorGrid
control toColor.Empty
no longer treats the value as a valid colour - The
ColorGrid
control no longer defines custom colour regions when theShowCustomColors
property 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
ColorWheel
control 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
ColorGrid
orRgbaColorSlider
- When the
AutoAddColors
andShowCustomColors
properties arefalse
, unmatched colours will no longer be silently added to theColorGrid
custom palette unexpectedly. This also resolves various crashes after the colour regions fix above was applied. - The
ColorWheel
control now makes use ofButtonRenderer.DrawParentBackground
to draw itself, to avoid ugly blocks of solid colours when hosted in containers such as theTabControl
- The
ColorEditorManager
control'sColorChanged
event 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
ColorCollection
bound to aColorGrid
control was modified, and this particular entry was the selected colour, theColorGrid
would not keep itsColor
property in sync and would clear the selected index. - Attempting to set the
Columns
property to less than zero now throws anArgumentOutOfRange
exception rather than setting it, then crashing later on - Double clicking a colour in the grid of the
ColorPickerDialog
no longer opens another copy of theColorPickerDialog
- Fixed problems in the
ColorGrid
with keyboard navigation and initial focus if no valid colour index was set. - The
ColorCollection.Find
method 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
ColorCollection
class had been created and the collection was then updated, in some cases the lookup wasn't correctly modified.
- Added
Find
method toColorCollection
- Replaced
ColorComparer.Brightness
with version derived from here - Added new
InterleavedBitmapPaletteSerializer
class, 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
CanRead
andCanWrite
properties toIPaletteSerializer
to indicate input/output support. - The
PaletteSerializer.DefaultOpenFilter
andPaletteSerializer.DefaultSaveFilter
make 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
ColorEditor
now only load when the drop down is opened, or the Up, Down, Page Up or Page Down keys are pressed - Reworked the
ColorEditor
control to work nicer with RGB colours. Previously, theColor
property was a wrapper around theHslColor
property, 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
ColorEditorManager
component to also store separate copies of the RGB/HSL colours instead of loosing named colour information - Experimented with making the
hex/named colour
field in theColorEditor
control 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
SelectionSize
property of theColorWheel
didn'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
Value
of theLightnessColorSlider
control now correctly updates theColor
property of that control, in turn making theColorEditorManager
change the luminosity of linked controls. Also setting theColor
of theLightnessColorSlider
now correctly updates theValue
. This now means you can bind aColorWheel
to aLightnessColorSlider
for full control over the brightness of a colour, which is not possible to do with the wheel alone.
- Added static
LoadPalette
and instanceLoad
methods toColorCollection
- Added
Save
method toColorCollection
- Added new constructor to
ColorCollection
that accepts aSystem.Drawing.Imaging.ColorPalette
class. - Added new
AutoFit
property to theColorGrid
. When set, theCellSize
property is automatically calculated based on the size of the control, and its contents. You can't combineAutoFit
withAutoSize
. ColorCollection
is now clone-able
- Removed unnecessary
UpdateStyles
calls. - Fixed a problem if a window was opened by pressing
Enter
, and aColorGrid
was the first focusable control on the new window, the pop-up colour editing dialog would be activated, regardless of theColorGrid
's editing settings
- Added
Name
andDefaultExtension
properties toIPaletteSerializer
- Added new static properties
DefaultOpenFilter
andDefaultSaveFilter
, and static methodGetSerializer
toPaletteSerializer
. These allow the use of reflection for easily providing palette load and save functionality automatically based on loaded assemblies. - Added the
SupportsTransparentBackColor
control style toColorGrid
- Added system colours to the
ColorEditor
named colour drop down - Added a new
DoubleSoft
cell border style to theColorGrid
- Setting the
Spacing
orCellSize
properties of theColorGrid
control didn't recalculate the layout ColorEditor
now usesTextRenderer.DrawText
instead ofGraphics.DrawString
so all text is rendered consistently.
- Added new constructor to the
ColorCollection
class that accepts anIEnumerable<int>
ColorCollection
now implementsIClonable
- Added dotted outline to design time
ColorGrid
control
- Fixed invalid default value for the
EditMode
property of aColorGrid
- Fixed
AutoSize
property ofColorGrid
control 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.
IPaletteReader
replaced withIPaletteSerializer
JascPaletteReader
replaced withJascPaletteSerializer
GimpPaletteReader
replaced withGimpPaletteSerializer
PaintNetPaletteReader
replaced withPaintNetPaletteSerializer
- The values of the
ColorEditingMode
enum have been renamed to make more sense. - The
ColorEditor
now 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
ColorPickerDialog
now 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
GimpPaletteReader
for reading palette files created by Gimp - Added
ReadPalette(fileName)
overload toIPaletteReader
- Renamed
Jasc10PaletteReader
toJascPaletteReader
- 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