ASWP – Interview With Björn Ottosson, Creator Of The Oklab Color Space

Oklab: A New Perceptual Color Space

Oklab is a perceptual color space developed by Swedish engineer Björn Ottosson. It’s supported in all major browsers and has gained traction due to its improved color handling compared to traditional color spaces like sRGB and HSL. This interview with Philip Jägenstedt delves into the creation, adoption, and future of Oklab.

About Björn Ottosson

Björn Ottosson has a background in the game industry, working on engines and titles like FIFA, Battlefield, and Need for Speed. His passion for technology and its intersection with the arts drove him to develop Oklab, a color space that addresses the limitations of existing solutions. He’s an engineer with a deep interest in color perception.

The Challenge of Color Manipulation

Color manipulation in software often doesn’t align with how humans perceive colors. sRGB, a commonly used color space, isn’t designed to mimic human vision. It’s based on CRT monitors, making it inadequate for representing the full spectrum of colors we experience. As a result, you might encounter unexpected results like purple hues in gradients between blue and white, which don’t accurately reflect human perception.

Human Color Perception

Understanding how humans perceive color is crucial for creating accurate color spaces. Light enters the eye, hits the retina, and is processed by multiple layers of neurons, resulting in a mental impression of color. While the process is complex, most people share a similar perception. Research into color vision has led to models like CIE XYZ, which uses information about the sensitivity of photoreceptor cells to different light frequencies.

Creating Oklab

Ottosson recognized the limitations of existing color spaces and sought to create a better solution. Oklab aims to achieve a balance between color perception and ease of manipulation. He used data from two existing color spaces, CIECAM16 and IPT, to develop Oklab’s properties.

CIECAM16, a color appearance model, provided lightness and saturation estimates, while IPT, designed for better hue uniformity, formed the basis for Oklab’s hue. By combining these datasets, Oklab aims to provide both good hue uniformity and accurate handling of lightness and saturation.

Oklab’s Adoption

Oklab’s simplicity and effectiveness led to its rapid adoption across the web. Its 10-line codebase makes it easy for open-source libraries to integrate. Chris Lilley from the W3C championed Oklab’s inclusion in CSS, and Photoshop adopted it for its gradients.

Okhsl: A Compromise for Color Selection

While Oklab offers better color perception, its complex parameter space can make color selection challenging. Okhsl attempts to address this by providing a more straightforward parameter space, similar to HSL, where all parameters can be adjusted independently without going outside the sRGB color space. This makes it easier to select and manipulate colors while still maintaining the advantages of Oklab for less saturated colors.

Color Compromises: The Reality of Color Spaces

Color perception is inherently complex. Color spaces are constantly evolving, and there are always compromises involved in creating a solution that works well in various contexts. Oklab’s inherent exposure invariance can lead to a perception of an overabundance of dark shades, especially against white backgrounds. Okhsl attempts to address this by incorporating a new lightness estimate.

Conclusion

Oklab represents a significant advancement in color space technology, offering a better understanding of color perception and making it easier to manipulate colors in software. Its rapid adoption and ongoing development demonstrate its value in addressing the complexities of color in the digital world. This summary was based on an article found at this link: https://smashingmagazine.com/2024/10/interview-bjorn-ottosson-creator-oklab-color-space/

Hey there…Welcome to AltShift.

If you’ve ever looked for a web developer, marketing agency, or tech consultant, you already know how frustrating the process is.

Quotes vary wildly—from a $500 freelancer on the internet to a $50,000 agency proposal. Everyone promises the world, but most business owners end up getting burned: getting stuck with slow load speeds, broken lead forms, or an agency that charges $200+ an hour just to change a line of text while holding their server keys hostage.
It feels like a minefield. We get it.

We built AltShift to be the partner we wished existed.

Whether you need custom Web Design, a high-volume eCommerce store, targeted SEO, or complex systems integrations, we don't just hand you a static, passive website. We build active digital platforms—wiring your online presence directly into your CRM, sales channels, and daily business tools so your technology actually handles real work for your team.

When you work with us, you aren't gambling on a solo freelancer trying to wear five hats, and you aren't adding another $60,000 salary to payroll. You get a complete senior digital department—UI designers, custom developers, cloud engineers, and SEO strategists—working for a flat, predictable rate with zero hourly meters. Best of all, you own 100% of your code, data, and infrastructure from day one.

We know picking the right team takes trust, and we don't expect you to take our word for it. Take a look around our site, see how we build, and when you're ready, let's connect.

Give us a call at (419) 930-9944 or book a FREE 30-minute Strategy Call with our team. No high-pressure sales pitches—just a direct, honest conversation to see if we're a fit for your business.

Welcome to AltShift.

AltShift Is Trusted By Companies Big and Small

What Our AWESOME Clients Have To Say