This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit https://www.cyotek.com/blog for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Posts tagged with 'color'

Working with CorelDRAW Palettes part 2, writing .pal files

c# color rgb color palette cmyk coreldraw 0 Comments Downloads

In my previous article, I described how to read an archaic CorelDRAW! 3.0 palette file. This continuation covers how to write files in this format.

Just like reading the file, writing is also a simple enough process.

Read More

Working with CorelDRAW Palettes part 1, reading .pal files

c# color rgb color palette cmyk coreldraw 0 Comments Downloads

I recently picked up a copy of CorelDRAW! 3.0 from eBay which came on two CD's with a different version on each. That gave me two different surprises, the first in that 3.0A wasn't an improved version of 3.0, and secondly instead of the .cpl format I was expecting to find, there were two different .pal formats, one text based (for CorelDRAW!) and one binary (for PHOTO-PAINT! (very shouty this software!)). This first article covers reading the text based palette format.

The palette format itself is simple enough, from the example colours below we can infer that each colour entry is in CMYK format with the range 0-100. Although it looks as if it is a fixed width format, when looking at other palettes using this format this isn't the case and columns can be of differing widths.

Read More

Converting colours between RGB and CMYK in C#

c# color rgb cmyk 2 Comments Downloads

In my previous articles on reading and writing colours from various palette/swatch formats, I left CMYK conversion as an exercise for the reader and only demonstrated RGB aspects. This article demonstrates how to convert colours in CMYK format to RGB and vice versa.

Unlike RGB which generally uses the range 0-255, most examples of CMYK I've seen use percentages instead, e.g. 37% cyan, 18% magenta, no yellow and 31% black. In this article I'm using the range 0-1 to describe the colours. (Just to be awkward, the demonstration front end uses 0-100 to make it more user friendly!)

Read More

Finding nearest colors using Euclidean distance

c# color algorithm euclidean 1 Comments Downloads

I've recently been updating our series on dithering to include ordered dithering. However, in order to fully demonstrate this I also updated the sample to include basic color quantizing with a fixed palette.

While color reduction and dithering are related, I didn't want to cover both topics in a single blog post, so here we are with a first post on finding the nearest color via Euclidean distance, and I'll follow up in another post on ordered dithering.

Read More

ColorPicker Controls 1.0.4.0 Update

c# winforms graphics opensource color rgb hsl colorpicker 6 Comments

The ColorPicker Controls have been updated to version 1.0.4.0.

This is a fairly substantial update, with quite a few bug fixes and enhancements to the code.

Read More

ColorPicker Controls Update 1.0.2.0

c# winforms graphics opensource color rgb hsl colorpicker 1 Comments Downloads

I've been pretty busy recently pushing out updates to WebCopy, a pending update to Spriter and working on a game project so blog posts have suffered a bit. While I work to correct that, we've just pushed an update to the ColorPicker controls.

This update contains breaking changes due to a number of renamed classes and enum members.

Read More

ColorPicker Controls for Windows Forms

c# winforms graphics opensource color rgb hsl colorpicker 7 Comments Downloads

Back at the start of the new millennium, I had a publishing agreement with another company to publish our components under their branding. The first of these components was the ColorPicker ActiveX control. Roll on 13 years later and that publishing agreement is long expired, ActiveX is dead, and yet here I am again writing a color picker control. Except this time losing money rather than making it. There's probably a life lesson buried in there somewhere.

All of our current products ask for a color at least once (mostly buried in an options dialog), and some of the prototype products we are working on ask for more. Currently, we just wrap around the System.Drawing.Design.ColorEditor class, which overtime has identified a few problems:

Read More