Changeset e29cc2e for trip-planner-front/node_modules/colord/README.md
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/colord/README.md
r59329aa re29cc2e 744 744 </details> 745 745 746 <details> 747 <summary><b><code>.minify(options?)</code></b></summary> 748 749 Converts a color to its shortest string representation. 750 751 ```js 752 import { colord, extend } from "colord"; 753 import minifyPlugin from "colord/plugins/minify"; 754 755 extend([minifyPlugin]); 756 757 colord("black").minify(); // "#000" 758 colord("#112233").minify(); // "#123" 759 colord("darkgray").minify(); // "#a9a9a9" 760 colord("rgba(170,170,170,0.4)").minify(); // "hsla(0,0%,67%,.4)" 761 colord("rgba(170,170,170,0.4)").minify({ alphaHex: true }); // "#aaa6" 762 ``` 763 764 | Option | Default | Description | 765 | ------------- | ------- | ------------------------------------------------------------ | 766 | `hex` | `true` | Enable `#rrggbb` and `#rgb` notations | 767 | `alphaHex` | `false` | Enable `#rrggbbaa` and `#rgba` notations | 768 | `rgb` | `true` | Enable `rgb()` and `rgba()` functional notations | 769 | `hsl` | `true` | Enable `hsl()` and `hsla()` functional notations | 770 | `name` | `false` | Enable CSS color keywords. Requires `names` plugin installed | 771 | `transparent` | `false` | Enable `"transparent"` color keyword | 772 773 </details> 774 746 775 <div><img src="assets/divider.png" width="838" alt="---" /></div> 747 776 … … 884 913 885 914 <details> 915 <summary><b><code>minify</code> (Color string minification)</b> <i>0.5 KB</i></summary> 916 917 A plugin adding color string minification utilities. 918 919 ```js 920 import { colord, extend } from "colord"; 921 import minifyPlugin from "colord/plugins/minify"; 922 923 extend([minifyPlugin]); 924 925 colord("black").minify(); // "#000" 926 colord("#112233").minify(); // "#123" 927 colord("darkgray").minify(); // "#a9a9a9" 928 colord("rgba(170,170,170,0.4)").minify(); // "hsla(0,0%,67%,.4)" 929 colord("rgba(170,170,170,0.4)").minify({ alphaHex: true }); // "#aaa6" 930 ``` 931 932 </details> 933 934 <details> 886 935 <summary><b><code>mix</code> (Color mixing)</b> <i>0.96 KB</i></summary> 887 936 888 A plugin adding acolor mixing utilities.937 A plugin adding color mixing utilities. 889 938 890 939 In contrast to other libraries that perform RGB values mixing, Colord mixes colors through [LAB color space](https://en.wikipedia.org/wiki/CIELAB_color_space). This approach produces better results and doesn't have the drawbacks the legacy way has.
Note:
See TracChangeset
for help on using the changeset viewer.