This software is not affiliated with the CIE (International Commission on Illumination), has not been validated by it, and is released into the public domain. It is provided "as is" without any warranty.
The implementation of the CIEDE2000 color difference formula consists of a function having consistent results across various programming languages:
- JavaScript — TypeScript
- C — C++
- PHP
- Java — Kotlin
- Python
- Rust
- Ruby
The functions provided in this repository have been rigorously tested to ensure accurate color evaluation shared across supported languages, with a tolerance of 1e-10.
Extensive testing has been conducted to verify the correctness and consistency of the implementations across programming languages:
- Test Cases: A set of test cases is used to validate the implementations.
- Tolerance: The results are validated to be within a tolerance of 1e-10.
- Cross-Language: All supported programming languages are tested, ensuring that results are consistent regardless of the language used.
Use the CIEDE2000 color difference formula in your programming language.
// Example usage in JavaScript
const deltaE = ciede2000(l1, a1, b1, l2, a2, b2);
console.log(deltaE);
// Example usage in C
double deltaE = ciede_2000(l1, a1, b1, l2, a2, b2);
printf("%f\n", deltaE);
# Example usage in Python
delta_e = ciede_2000(l1, a1, b1, l2, a2, b2)
print(delta_e)
// Example usage in PHP
$deltaE = ciede2000($l1, $a1, $b1, $l2, $a2, $b2);
echo $deltaE;
// Example usage in Java
double deltaE = ciede2000(l1, a1, b1, l2, a2, b2);
System.out.println(deltaE);
// Example usage in Kotlin
val deltaE = ciede2000(l1, a1, b1, l2, a2, b2)
println(deltaE)
# Example usage in Ruby
delta_e = ciede_2000(l1, a1, b1, l2, a2, b2)
puts delta_e
We aim to extend the compatibility of the deltaE-2000
function to additional programming languages to meet the diverse needs of the users.
-
Go: In Progress
- Implement the
deltaE-2000
function. - Write usage documentation.
- Create unit tests.
- Implement the
-
Swift: Planned
- Implement the
deltaE-2000
function. - Write usage documentation.
- Create unit tests.
- Implement the
-
TypeScript: Planned
- Implement the
deltaE-2000
function. - Write usage documentation.
- Create unit tests.
- Implement the
-
MATLAB: Planned
- Implement the
deltaE-2000
function. - Write usage documentation.
- Create unit tests.
- Implement the
-
R: Planned
- Implement the
deltaE-2000
function. - Write usage documentation.
- Create unit tests.
- Implement the
- Choose a language: Choose a language that interests you.
- Implement the function: Develop the
deltaE-2000
function in the language, based on the implementations. - Write documentation: Add a section in the
README.md
file for the new language, including an example. - Create tests: Write the same test routines as all languages, to ensure the consistency of results.
- Submit a pull request: Once your implementation is complete, submit a pull request for review.
You can see a live example of the CIEDE2000 color difference calculation at the following link:
This project is released into the public domain.