AL_COLOR_DISTANCE_CIEDE2000(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… 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 uses al_color_lab(3) internally, which defines the L component to be in the range 0..1 (and not 0..100 as 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