SkillAgentSearch skills...

ArtColors

Intuitive color mixing in a subtractive Red-Yellow-Blue color space. A traditional art school color wheel and palette selector for triadic, split-complementary and tetradic color harmonies. RGB-to-RYB conversion with simple formulas. Built with RayLib.

Install / Use

/learn @ProfJski/ArtColors
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ArtColors:

ArtColors provides intuitive color mixing in subtractive Red-Yellow-Blue color space. It's a digital version of the traditional art school color wheel, which provides triadic, split-complementary,tetradic and analogous color harmonies. It helps to select pleasing palettes of colors. ArtColors also provides RGB-to-RYB conversion with simple formulas. The program is built with RayLib and RayGui, but the RYB-RGB formulas can be used separately in your own code.

First beta release: March 2020. Version 0.20 released in April 2021. See Roadmap.md and Changelog for details.

ScreenShot

ScreenShot

Goals

  1. Intuitive color mixing for graphic design, data visualization, GUI creation or video game graphics.

    Everyone grows up learning that yellow and blue make green, not cyan! Additive mixing in the RGB space is unintuitive. Subtractive mixing in the RYB space is familiar.

  2. Easy generation of harmonious palettes for pleasing graphic design.

    The basic color schemes in fine art are based on simple geometric relations on an RYB color wheel which has red, yellow and blue primaries 120 degrees apart. The typical RGB color wheel has red, green and blue 120 degrees apart, so these relations fail. In RGB, the blue-green spectrum tends to dominate, obscuring yellows, purples and browns.

  3. Portable simple formulas for RYB-to-RGB conversion and subtractive color mixing.

    There is a lot of literature on subtractive color mixing. My approach aims for a compromise between simplicity and accuracy, with much less code than a reflectance-based approach. Most subtractive color mixing is done in the CMYK- space, rather than RYB, so hopefully these formulas fill a need.

How To Use ArtColors

To pick a color palette

Select a type of color palette (triadic, tetradic, etc.) by clicking on the Palette Type button, then rotate the Hue slider. The small squares that move around the perimeter of the wheel indicate the principal colors of your palette. They are the same colors as shown in the larger rectangles to the right of the wheel, which also show their RGB values. The swatches to the right vary the hue and saturation of your principal colors to provide a wide range of options. You can export these values to disk by pressing the "Save swatches to .pal" button. Done!

You may also wish to check whether your palette is suitable for colorblind users. In the lower right, clicking the "Colorblind mode" button changes your color swatches to approximate how they may be perceived by viewers with various color vision deficiencies: protanopia, deuteranopia, tritanopia and achromatopsia. Click once more to return to normal view. A colorblindness check is especially important for data visualization.

To mix your own shades using RYB

On the lower left of the screen, there are two areas to generate colors from RYB values using sliders for Red, Yellow and Blue values. These colors, or any other colors on the screen, can be blended by sampling them. Click "Pick Color" and left-click on one color, then click "Pick Color" again and right-click on another color. They will appear on the left and right sides of the color mixing bars in the middle-right of the screen. The subtractive color mixing bar uses our algorithm to represent better how pigments blend in art media (paints, inks, pencils, crayons).

Explanation of the Interface

Canvas Color - Switches between black or white background. You should definitely view your colors against both backgrounds, especially to appraise very light tints or dark shades.

Palette Type - Choose from one of six types of color harmonies (see explanation below). The harmonies have different numbers of principal colors: Triadic has 3, Split Complementary has 3, Square Tetradic has 4, Rectangular Tetradic has 4, Complementary just 2, and Analogous has 4. Your basic theme colors are those which appear to the right of the color wheel, and their locations are marked by small squares, similar to the windows in a handheld color wheel (see picture below).

Palette Swatches - Determined by your selected palette type. A range of saturations and tints/shades based on the theme colors, from almost-black to almost-white, and from low saturation to high.

Custom Color Mixing - At the bottom of the screen are two Red-Yellow-Blue mixing areas. Color A and Color B are mixed in the color mixing bars according to three kinds of mixing (see explanation below): Additive Quadratic mixing, Additive Linear mixing (the one you are used to), and Subtractive (yay!). Check the tiny box above "Inverse" to display the inverse color of the subtractive mix. Each color bar starts from 100% of Color A to 100% of Color B, ranging by 10% steps in between.

All Color Triplets shown on-screen are RGB values so you can copy them down if you'd like.

Exporting - Palettes are saved in .pal files, which are an ASCII readable standard. You can import the palettes into GIMP, Paint Shop Pro, Adobe, etc. Save swatches will save all the color swatches. This will be 72 times the number of theme colors in your palette. Save color bars will save the color mixing bar of your choice. Color bar palettes are only 11 colors in size. If you check the "Inverse" box, an option to save the inverse color bar will also appear.

If you want to extract the RGB data from the .pal file with a text editor, the first three lines of the file are: a FOURCC code (JASC-PAL), a file type version (100) and the number of colors in the palette. All subsequent numbers are RGB triplets for each color in the palette. Lines are terminated with \r\n. The file can safely be edited to suit your needs. Some programs may require either 16 or 256 colors in a .pal file; others don't abide by this convention, including GIMP.

Screen Shot - Useful if you want to import the whole screen into a graphics program, and sample there whatever hue you want.

Challenges and Design Principles of ArtColors

A brief summary of the challenges of designing a subtractive Red-Yellow-Blue color space explains the principles I used to design ArtColors. It also summarizes many of the things I learned while researching this project, and so I offer it in case it is instructive to others.

Hereafter common color space names will be abbreviated as follows:

RYB-=Subtractive Red-Yellow-Blue color space Our color system.
RGB+=Additive Red-Green-Blue The system most widely used for monitor display. Wiki
HSV=Hue-Saturation-Value An alternative representation of the RGB+ system. Wiki
CYMK-=Cyan-Yellow-Magenta-Black A subtractive system, most frequently used in printing. Wiki

Challenge #1: Everyone learns color mixing using RYB- primaries not RGB+

From the time you first played with crayons or fingerpaints, you've been using an RYB- color space. Red plus green make a murky brown, but in RGB+ they make yellow. Red and blue make a dark purple, but in RGB+ they make a bright magenta. This can make it hard to quickly find the colors you want when blending.

RGB+ makes sense for what it was designed to do. Computer monitors are emissive: they emit light which therefore blends additively. No painting can do this. Art media are reflective: the pigments we use absorb incident white light and reflect what they don't absorb. Thus, they are subtractive: the more pigments one adds, the less light is reflected to the eye. RGB+ was designed to align two of its primaries (blue and green) with two of the colors of light to which the three types of human cone cells in the eye are most responsive. RGB's third color, red, was chosen instead of the third cone color of yellow-green to give breadth of palette for mixing and the particular red was somewhat based on available emissive light sources at the time.<sup>1</sup>

Some disadvantage of RGB+ are: the vast majority our experience mixing colors is in a subtractive space, and many colors in our experience are non-spectral (see below).

Moreover, traditional instruction in fine art still uses RYB- to teach color theory, as well as some textbooks in practical and decorative arts.<sup>2</sup> Traditional art color theory has a long and complex history, in part driven by the range of pigments available to artists and their vast experience. While the theoretical formalization of this body of knowledge into RYB- was premised in part (but only in part!) on erroneous 19th century ideas of the physics of color, the approach is still fundamentally valid -- as evidenced by the fact that artists, who devote enormous study to color -- still use it as a reference today. The success of RYB- does not depend on its ability to theoretically unify the physics of light and human physiology, but on its empirical validity to accurately predict what color will result from subtractive color mixing.<sup>3</sup>

Thus almost everyone who has ever taken an art class or read a book on art color theory has encountered the standard RYB- color wheel:
Artist Color Wheel

Principle #1: ArtColors should mimic a standard RYB- color wheel

Challenge #2: RGB+ and HSV color wheels are blue-green dominated

Because two of the three primaries are green and blue, the yellow-orange range is severely compressed, purple is likewise narrow and dominated by magenta. One has to be sniper to select these hues. Small changes in RGB values or HSV hue quickly sweep through these ranges of color.

Compare the standard HSV color wheel with the ArtColor color wheel to see the problem and its solution: ![HSV Color Wheel](images/HSV-wheel.p

View on GitHub
GitHub Stars62
CategoryDevelopment
Updated1mo ago
Forks6

Languages

C++

Security Score

100/100

Audited on Feb 13, 2026

No findings