You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@csstools/postcss-oklab-function

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
p

@csstools/postcss-oklab-function

Use oklab() and oklch() color functions in CSS

4.0.10
latest
100

Supply Chain Security

100

Vulnerability

98

Quality

88

Maintenance

100

License

Version published
Weekly downloads
4.5M
-5.88%
Maintainers
3
Weekly downloads
 
Created
Issues
9

What is @csstools/postcss-oklab-function?

@csstools/postcss-oklab-function is a PostCSS plugin that allows you to use the OKLab color function in your CSS. OKLab is a color space designed to be perceptually uniform, meaning that the perceived difference between colors is consistent across the entire color space. This plugin enables you to write colors in the OKLab color space and have them converted to a more widely supported format.

What are @csstools/postcss-oklab-function's main functionalities?

Using OKLab color function

This feature allows you to write colors using the OKLab color function in your CSS. The plugin will convert these colors to a more widely supported format, such as RGB.

/* Input CSS */
body {
  color: oklab(59.69% 0.072 -0.236);
}

/* Output CSS */
body {
  color: rgb(255, 0, 0);
}

Custom properties with OKLab

This feature allows you to define custom properties using the OKLab color function. The plugin will convert these custom properties to a more widely supported format.

/* Input CSS */
:root {
  --primary-color: oklab(59.69% 0.072 -0.236);
}

body {
  color: var(--primary-color);
}

/* Output CSS */
:root {
  --primary-color: rgb(255, 0, 0);
}

body {
  color: var(--primary-color);
}

Other packages similar to @csstools/postcss-oklab-function

FAQs

Package last updated on 27 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts