AL_COLOR_DISTANCE_CIEDE2000(3)
π
al_color_distance_ciede2000(3) β Library Functions Manual π
β¨ NAME β¨
okay so the main character of this page is:
al_color_distance_ciede2000β Allegro 5 API
π SYNOPSIS π
bestie, the synopsis is literally this:
#include <allegro5/allegro_color.h>
double al_color_distance_ciede2000(ALLEGRO_COLOR color1,
ALLEGRO_COLOR color2) {
yes, that opening brace is just sitting there. we respect it. π«Ά
π DESCRIPTION π
okay so al_color_distance_ciede2000 computes the CIEDE2000 color difference between two RGB colors. Itβs giving visually uniform color difference, unlike for example the RGB distance. β¨
When you use the RGB distance (Euklidean distance between two RGB triplets), there can be color pairs with the same distance, where the colors of one pair appear to be almost the same color, while the colors of the other pair look quite different. not iconic. π
This is improved by using the L*a*b* color space, which was designed with perceptual uniformity in mind. But lowkey it still is not completely uniform. The CIEDE2000 formula contains some additional transformations to fix that. slay.
The returned color distance is roughly in the range 0 (identical color) to 1 (completely different color) β but values greater than one are possible. highkey important.
Note: This function usesal_color_lab(3)internally, which defines theLcomponent to be in the range0..1(and not0..100as is sometimes seen). π
π SINCE π
5.2.3 β periodt. π
mwah π β footer source/version: Allegro reference manual; page: al_color_d...e_ciede2000(3); date: none listed in this footer, bestie. π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms