Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@csstools/postcss-oklab-function

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-oklab-function

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

  • 4.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3M
decreased by-14.93%
Maintainers
3
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 11 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc