colbrush 1.13.0 → 1.14.0

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  #### A React theme switching library that makes it easy to apply color-blind accessible UI themes.
4
4
 
5
- <img width="1434" height="314" alt="스크린샷 2025-10-27 오전 9 05 44" src="https://github.com/user-attachments/assets/c009bd8c-974c-4e99-b28b-86acb9df26d9" />
5
+ <img width="1434" height="314" alt="colbrush" src="https://github.com/user-attachments/assets/c009bd8c-974c-4e99-b28b-86acb9df26d9" />
6
6
 
7
7
  ---
8
8
 
@@ -236,3 +236,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
236
236
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
237
237
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
238
238
  SOFTWARE.
239
+
package/dist/cli.cjs CHANGED
@@ -36,7 +36,7 @@ function parseFlags(argv = process.argv.slice(2)) {
36
36
  }
37
37
 
38
38
  // src/core/constants/regex.ts
39
- var variableRegex = /(--color-[\w-]+):\s*(#[0-9a-fA-F]{3,8})/g;
39
+ var variableRegex = /(--color-[\w-]+):\s*([#a-fA-F0-9]{3,8}|(?:oklch|lab|rgb|hsl)\([^)]+\))/g;
40
40
  var variationRegex = /^--(.+?)-(50|100|200|300|400|500|600|700|800|900)$/i;
41
41
 
42
42
  // src/cli/applyThemes.ts
@@ -76,8 +76,9 @@ var DEFAULT_SCALE = {
76
76
  // src/core/utils/colorScale.ts
77
77
  var CLAMP01 = (x) => Math.max(0, Math.min(1, x));
78
78
  var Color = import_colorjs.default.default ?? import_colorjs.default;
79
- function hexToOKLCH(hex) {
80
- const c = new Color(hex);
79
+ function hexToOKLCH(color) {
80
+ const normalizedColor = color.replace(/,(?=\s*\d)/g, " ");
81
+ const c = new Color(normalizedColor);
81
82
  const o = c.to("oklch");
82
83
  return { l: o.l, c: o.c, h: o.h ?? 0 };
83
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colbrush",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "A React theme switching library that makes it easy to apply color-blind accessible UI themes",
5
5
  "homepage": "https://colbrush.site",
6
6
  "repository": {