oklchtohex 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,13 +69,57 @@ No command changes needed. Keep `next dev`, `next build`, `next start`.
|
|
|
69
69
|
|
|
70
70
|
```js
|
|
71
71
|
{
|
|
72
|
-
gamut: "clip",
|
|
73
|
-
includeAlpha: "auto",
|
|
72
|
+
gamut: "clip",
|
|
73
|
+
includeAlpha: "auto",
|
|
74
74
|
uppercase: false,
|
|
75
|
-
onError: "preserve"
|
|
75
|
+
onError: "preserve",
|
|
76
|
+
convertDev: true,
|
|
77
|
+
convertBuild: true,
|
|
78
|
+
include: /\.(css|pcss|postcss|scss|sass|less|styl|stylus)(?:$|\?)/i,
|
|
79
|
+
exclude: undefined
|
|
76
80
|
}
|
|
77
81
|
```
|
|
78
82
|
|
|
83
|
+
- `gamut`
|
|
84
|
+
Allowed: `"clip"` | `"fit"`
|
|
85
|
+
Default: `"clip"`
|
|
86
|
+
`"clip"` clamps out-of-gamut channels, `"fit"` reduces chroma to fit sRGB.
|
|
87
|
+
|
|
88
|
+
- `includeAlpha`
|
|
89
|
+
Allowed: `"auto"` | `"always"` | `"never"`
|
|
90
|
+
Default: `"auto"`
|
|
91
|
+
Controls whether alpha is included in output HEX.
|
|
92
|
+
|
|
93
|
+
- `uppercase`
|
|
94
|
+
Allowed: `true` | `false`
|
|
95
|
+
Default: `false`
|
|
96
|
+
Outputs uppercase HEX when `true`.
|
|
97
|
+
|
|
98
|
+
- `onError`
|
|
99
|
+
Allowed: `"preserve"` | `"throw"`
|
|
100
|
+
Default: `"preserve"`
|
|
101
|
+
`"preserve"` keeps original token if conversion fails.
|
|
102
|
+
|
|
103
|
+
- `convertDev` (Vite only)
|
|
104
|
+
Allowed: `true` | `false`
|
|
105
|
+
Default: `true`
|
|
106
|
+
Enable/disable conversion in `vite dev`.
|
|
107
|
+
|
|
108
|
+
- `convertBuild` (Vite only)
|
|
109
|
+
Allowed: `true` | `false`
|
|
110
|
+
Default: `true`
|
|
111
|
+
Enable/disable conversion in `vite build`.
|
|
112
|
+
|
|
113
|
+
- `include` (Vite only)
|
|
114
|
+
Allowed: `RegExp` | `(id: string) => boolean`
|
|
115
|
+
Default: `/\.(css|pcss|postcss|scss|sass|less|styl|stylus)(?:$|\?)/i`
|
|
116
|
+
Only files matching this are processed.
|
|
117
|
+
|
|
118
|
+
- `exclude` (Vite only)
|
|
119
|
+
Allowed: `RegExp` | `(id: string) => boolean` | `undefined`
|
|
120
|
+
Default: `undefined`
|
|
121
|
+
Matching files are skipped.
|
|
122
|
+
|
|
79
123
|
## What It Handles
|
|
80
124
|
|
|
81
125
|
- `oklch(...)` -> HEX
|