RunMat
GitHub

lab2rgb — Convert CIE L*a*b* values to sRGB using D65 white.

lab2rgb(LAB) converts CIE L*a*b* image or colormap values to sRGB using the default D65 assumptions.

How lab2rgb works

  • Accepts MxNx3 Lab images and Nx3 Lab colormaps.
  • Out-of-gamut RGB values are clipped to [0,1].
  • Name-value options are not implemented in this Tier 1 version.

Example

Lab To RGB

RGB = lab2rgb(LAB);

Expected output:

% RGB has red, green, and blue channels

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how lab2rgb works, line by line, in Rust.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code — faster, on any GPU, with no license required.

  • Simulations that took hours now take minutes. RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed.
  • Start running code in seconds. Open the browser sandbox or download a single binary. No license server, no IT ticket, no setup.
  • A full development environment. GPU-accelerated 2D and 3D plotting, automatic versioning on every save, and a browser IDE you can share with a link.

Getting started · Benchmarks · Pricing

Try RunMat for free

Open the sandbox and start running MATLAB code in seconds. No account required.