Socket
Book a DemoInstallSign in
Socket

postcss-color-gray

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-gray

Use the gray() color function in CSS

5.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1.2M
-7.68%
Maintainers
4
Weekly downloads
 
Created

What is postcss-color-gray?

The postcss-color-gray package is a PostCSS plugin that allows you to use the 'gray()' function in your CSS, which is a part of the CSS Color Module Level 4 specification. This function allows you to specify shades of gray in a more intuitive way.

What are postcss-color-gray's main functionalities?

Convert gray() function to rgb()

This feature converts the 'gray()' function to an equivalent 'rgb()' function. For example, 'gray(50%)' is converted to 'rgb(128, 128, 128)'.

/* Input CSS */
body {
  color: gray(50%);
}

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

Support for alpha transparency

This feature allows you to specify alpha transparency in the 'gray()' function. For example, 'gray(50% / 50%)' is converted to 'rgba(128, 128, 128, 0.5)'.

/* Input CSS */
body {
  color: gray(50% / 50%);
}

/* Output CSS */
body {
  color: rgba(128, 128, 128, 0.5);
}

Other packages similar to postcss-color-gray

Keywords

postcss

FAQs

Package last updated on 10 Oct 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.