<commit_before># PostCSS Color Rgb [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]

[PostCSS] plugin to transform [W3C CSS Color Module Level 4 rgb() and rgba()](https://drafts.csswg.org/css-color/#funcdef-rgb) new syntax to today's alternate syntax.

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/dmarchena/postcss-color-rgb.svg
[ci]:      https://travis-ci.org/dmarchena/postcss-color-rgb
[cov-img]: https://coveralls.io/repos/github/dmarchena/postcss-slideshow/badge.svg
[cov]:     https://coveralls.io/github/dmarchena/postcss-slideshow

```css
.foo {
  /* Input example */
  color: rgb(0 255 0 / .8);
}
```

```css
.foo {
  /* Output example */
  color: rgba(0, 255, 0, .8);
}
```
<commit_msg>Syntax info<commit_after># PostCSS Color Rgb [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]

[PostCSS] plugin to transform [W3C CSS Color Module Level 4 rgb() and rgba()](https://drafts.csswg.org/css-color/#funcdef-rgb) new syntax to actual syntax (rgb() or rgba()).

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/dmarchena/postcss-color-rgb.svg
[ci]:      https://travis-ci.org/dmarchena/postcss-color-rgb
[cov-img]: https://coveralls.io/repos/github/dmarchena/postcss-slideshow/badge.svg
[cov]:     https://coveralls.io/github/dmarchena/postcss-slideshow

```
// W3C CSS Colors 4 syntax
rgb() = rgb( <percentage>{3} [ / <alpha-value> ]? ) |
        rgb( <number>{3} [ / <alpha-value> ]? )
<alpha-value> = <number> | <percentage>

// W3C CSS Colors 3 syntax (actual)
rgb() = rgb( <percentage>#{3}) |
        rgb( <integer>#{3})
rgba() = rgba( <percentage>#{3} , <alpha-value>? ) |
         rgba( <integer>#{3} , <alpha-value>? )
```

```css
.foo {
  /* Input example */
  color: rgb(99.99 255 0 / 80%);
}
```

```css
.foo {
  /* Output example */
  color: rgba(100, 255, 0, .8);
}
```

{'fraction_non_alphanumeric': 0.21061007957559683, 'fraction_numerical': 0.023342175066312996, 'mean_word_length': 3.7506297229219143, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3151545', 'n_tokens_mistral': 789, 'n_tokens_neox': 733, 'n_words': 146}