Color Machine is a screen saver based on the old technique of creating a still image and achieving animation solely through gradual changes to the image's color palette. It's also my longest running software development project, started in about 1995 using Borland Turbo C/C++ for DOS, then partially ported OpenGL on Linux (only to be stymied by lack of support for the rarely used indexed color mode) around 2000, ported successfully to SDL 1.2 in 2005 or 2006, and finally ported to SDL 2 in 2021.

It's actually not even a full fledged screen saver; although it terminates on mouse clicks or key presses it lacks a background daemon to activate it after a period of desktop inactivity. I've thought of making it an XScreensaver module to avoid this task, but Color Machine has over 20 modules of it's own, so making it a module of another screen saver doesn't really feel appropriate, plus I don't care to think about yet another port. I've also considered borrowing some code from the XScreensaver daemon, but haven't looked into this too seriously yet. If anyone has a simple script that can act as an activation daemon shoot me an email.

News

2021.03.27
Color Machine 0.9 released:
  • Built using SDL 2
  • Improved modules
  • Improved palettes with ability to select between sharp linear (sawtooth) and smooth sine curves
  • Better command line parameters
  • Fullscreen or windowed mode
  • Customizeable resolution
2007.11.10
Color Machine 0.8 released.
  • Built using SDL 1.2
  • Fullscreen only
  • Fixed 1280x1024 resolution

Features

Screenshots

Here are a few images showing what just a few of Color Machine's modules look like. Still pictures don't really do it justice, watch the video above to appreciate the full effects.

Multipolarity Continuumn Jelly
Rays Osmosis Contour
Nucleus

Requirements

Color Machine is written mostly in C with some C++11, and depends only on SDL. Currently the software is provided only in source code form, so the SDL development headers are also needed for compilation. The provided source is built using GNU make, but the small size and simplicity of the code and lack of a large number of dependencies means that it should be trivial to built on any platform supporting SDL (Linux, Mac OS X, or Windows). At this time I have only built it on Linux.

Usage

To run Color Machine just execute

./colormachine
from the command line (Linux and other Unix systems) inside Color Machine's local directory. You can also specify command line options choosing a single module, palette, or effect to loop repeatedly, fixed durations for modules or effects, or even the seed for the random number generator so that effects can be repeated exactly.

For each command line switch specified be sure to not leave any spaces between the switch and equals sign or equals sign and value. Any combination of switches can be specified in any order.

Display help using

./colormachine --help
./colormachine --help-modules
./colormachine --help-palettes

Select a module or set of modules by number (see --help-modules for descriptions):

./colormachine m=MODULE1[,MODULE2,MODULE3,...]

Select a palette or set of palettes by number (see --help-palettes for descriptions):

./colormachine p=PALETTE1[,PALETTE2,PALETTE3,...]

Set the module duration time in seconds (by default is randomly set for each module between 20 and 40 seconds):

./colormachine t=TIME

Set the effect duration time in cycles (i.e., number of animation frames, by default randomly set for each effect between 90 and 240 cycles):

./colormachine c=CYCLES

Set the animation speed in frames per second (by default randomly set for each module between 60 and 120 FPS), not currently working well:

./colormachine f=FRAMESPERSEC

Set the random seed to generate repeatable starting conditions (any whole number):

./colormachine r=RANDOMSEED

License

Color Machine is Free Software, and is licensed under the GPL (GNU Public License) version 2.0.

Downloads

Color Machine is currently available only as C++ source. Standalone binaries may be made available in the future.

Anyone actually interested in tinkering with the source, know that while it is cleaned up somewhat from the original code which I started in high school, certain aspects such as variable naming and code documentation aren't up to the standards I apply to my newer code.

Color Machine 0.9 Source

This package contains source files and a makefile in a self-contained directory. Simply extract the data from the archive to any desired location, then build the application by executing

make
inside the directory from your system's command line. There's no install command provided, I just created a link to the executable on my desktop.

Older versions available here.


Contact me at arkaein@monsterden.net with any questions, suggestions, bug reports or patches for Color Machine.

Back to Monstrous Software


Last Updated 2021.04.07