logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

al_color_distance_ciede2000 - Allegro 5 API

Description

       This function computes the CIEDE2000 color difference between two RGB colors.  This is a visually uniform
       color difference, unlike for example the RGB distance.

       When  using  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.  This is improved by using the L*a*b* color space which was designed
       with  perceptual  uniformity in mind.  However it still is not completely uniform.  The CIEDE2000 formula
       contains some additional transformations to fix that.

       The returned color distance is roughly in the range 0 (identical color) to 1 (completely different color)
       - but values greater than one are possible.

              Note: This function uses al_color_lab(3alleg5) internally which defines the L component to  be  in
              the range 0..1 (and not 0..100 as is sometimes seen).

Name

       al_color_distance_ciede2000 - Allegro 5 API

Since

       5.2.3

Allegro reference manual                                                    al_color_distance_ciede2000(3alleg5)

Synopsis

              #include <allegro5/allegro_color.h>

              double al_color_distance_ciede2000(ALLEGRO_COLOR color1,
                    ALLEGRO_COLOR color2) {

See Also