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 palette'

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

Reading and writing 18-bit RGB VGA Palette (pal) files with C#

c# rgb color palette 18-bit 24-bit westwood dos 6-bit 8-bit 1 Comments Downloads

18-bit RGB palettes are an old format used by VGA displays of yesteryear (although interestingly Wikipedia states they are still used by many LCD monitors). These palettes use 6-bits for each of the red, green and blue channels and usually allowed a maximum of 256 colours from the 262,144 unique colours available.

Files using this format are usually quite recognisable, having the extension pal and a size of 768 bytes.

Read More

Writing Microsoft RIFF Palette (pal) files with C#

c# color palette riff 0 Comments Downloads

A short follow up and sample program which demonstrates how to write a RIFF palette with ease.

I covered the basics of the RIFF specification and how to read palettes in my previous article.

Read More

Loading Microsoft RIFF Palette (pal) files with C#

c# color palette riff 0 Comments Downloads

At the start of 2014, I published an article describing how to read colour palettes from BBM/LBM files. At the end of that article I noted that Microsoft palette files used a similar format, but I didn't investigate that at the time. Since then I followed up with articles on reading and writing Adobe's Color Swatch and Color Exchange format files and I also posted code for working with JASC, Gimp and a couple of other palette formats.

Now, finally, I decided to complete the collection and present an article on reading Microsoft's palette files. These files are RIFF forms containing colour data, similar to a BBM palette being an IIF form.

Read More

Writing Adobe Swatch Exchange (ase) files using C#

c# graphics color palette photoshop adobe ase 0 Comments Downloads

In my last post, I described how to read Adobe Swatch Exchange files using C#. Now I'm going to update that sample program to save ase files as well as load them.

I covered the basics of writing big-endian values in my original post on writing Photoshop aco files, so I'll not cover that again but only mention the new bits.

Read More

Reading Adobe Swatch Exchange (ase) files using C#

c# graphics color palette photoshop adobe ase 0 Comments Downloads

Previously I wrote how to read and write files using the Photoshop Color Swatch file format. In this article mini-series, I'm now going to take a belated look at Adobe's Swatch Exchange file format and show how to read and write these files using C#. This first article covers reading an existing ase file.

Unlike some of Adobe's other specifications, they don't seem to have published an official specification for the ase format themselves. For the purposes of this article, I've been using unofficial details available from Olivier Berten and HxD to poke around in sample files I have downloaded.

Read More

Writing Photoshop Color Swatch (aco) files using C#

c# graphics color palette aco photoshop adobe 0 Comments Downloads

The previous article in this mini-series described how to read files in Abode's Colour File format as used by applications such as Photoshop and other drawing programs.

In this second article, I'll describe how to write such files.

Read More

Reading Photoshop Color Swatch (aco) files using C#

c# graphics color palette aco photoshop adobe 5 Comments Downloads

In a previous article I described how to read the colour map from a DeluxePaint LBM/BBM file. In the next pair of articles, I'm going to describe how to load and save colour swatch files used by Photoshop (those with the .aco extension).

As usual, I'll start with a warning. I have a very limited set of sample files to test with, so it may be that there's an error in this code which means it can't handle all files. Certainly it can't handle all colour spaces (more on that later). However, I've tested it on a number of files download from the internet without problems.

Read More

Loading the color palette from a BBM/LBM image file using C#

c# graphics bbm lbm color palette iff 0 Comments Downloads

I took a break from arguing with our GIF decoder to take a quick look at the BBM format as I have a few files in that format containing colour palettes I wished to extract. When I looked into this, I found a BBM file is essentially an LBM file without any image data, so I set to work at writing a new palette serializer for reading and writing the palette files. This article describes how to read the palettes from BBM and LBM files.

Note: I only cover loading of color palette data in this article. The image data I don't even look at - this article does not represent a full LBM decoder.

Read More