CIE·JS WebAssembly Library Programming Manual
The Color & Illumination Engineering JavaScript Library, or CIE·JS, is a powerful tool for basic and advanced color calculations. It’s designed to work seamlessly within web applications and shell scripts using a JavaScript runtime tool like Deno.
What sets this library apart from conventional color calculation libraries are its unique features:
-
Spectral Foundations: Instead of relying on just three color values (e.g., RGB), CIE·JS employs spectral distributions as the fundamental basis for its calculations. This means that arrays of spectral power or reflectivity values represent colors. Even if you input three color values, the library will construct a spectral distribution based on additional information, like camera color profiles, or apply a default if none is available. This approach significantly enhances the precision of color calculations, allowing you to determine color appearances accurately for specific observers and viewing conditions.
-
Extensive Online Database: The library has access to a comprehensive online database containing spectral distributions of light sources, surface colors, display primaries, and sensor spectral sensitivities. It covers all standard observers and offers the flexibility to specify custom observers. Spectral data is fetched from the online database on demand to maintain the library’s compact size.
-
Blazing Speed and Security: CIE·JS is written in Rust, a programming language known for its exceptional speed and security. You don’t need to be familiar with Rust to use the library, as it’s packaged as a WebAssembly library, compatible with various other languages like JavaScript and Python.
-
Easy Integration: Integrating CIE-JS into web applications is straightforward. You can add just two lines of JavaScript code within your HTML files. Compiling or complex installations are unnecessary and compatible with modern computing platforms, including mobile devices.
-
Shell Scripting: Beyond web applications, CIE·JS can also be utilized through simple shell scripts, making it a convenient and rapid color calculator for various colorimetric evaluations.
In essence, CIE·JS offers a versatile and precise approach to color calculations, backed by a comprehensive database and powered by the speed and security of the Rust programming language. Whether you’re developing web applications or need quick color analysis through shell scripts, this library has you covered.
If you want to learn more, please let me know by using this form, and I can send you a link to the pre-release documentation of the (online) book.