@@ -300,119 +300,119 @@ func colorVariableReplace(content string) string {
300300 colorPatches := []Patch {
301301 {
302302 Name : "CSS: --spice-player" ,
303- Regex : "#(181818|212121)" ,
303+ Regex : "\b #(181818|212121)\b " ,
304304 Replacement : func (submatches ... string ) string {
305305 return "var(--spice-player)"
306306 },
307307 },
308308 {
309309 Name : "CSS: --spice-card" ,
310- Regex : "#282828" ,
310+ Regex : "\b #282828\b " ,
311311 Replacement : func (submatches ... string ) string {
312312 return "var(--spice-card)"
313313 },
314314 },
315315 {
316316 Name : "CSS: --spice-main-elevated" ,
317- Regex : "#(242424|1f1f1f)" ,
317+ Regex : "\b #(242424|1f1f1f)\b " ,
318318 Replacement : func (submatches ... string ) string {
319319 return "var(--spice-main-elevated)"
320320 },
321321 },
322322 {
323323 Name : "CSS: --spice-main" ,
324- Regex : "#121212" ,
324+ Regex : "\b #121212\b " ,
325325 Replacement : func (submatches ... string ) string {
326326 return "var(--spice-main)"
327327 },
328328 },
329329 {
330330 Name : "CSS: --spice-card-elevated" ,
331- Regex : "#(242424|1f1f1f)" ,
331+ Regex : "\b #(242424|1f1f1f)\b " ,
332332 Replacement : func (submatches ... string ) string {
333333 return "var(--spice-card-elevated)"
334334 },
335335 },
336336 {
337337 Name : "CSS: --spice-highlight" ,
338- Regex : "#1a1a1a" ,
338+ Regex : "\b #1a1a1a\b " ,
339339 Replacement : func (submatches ... string ) string {
340340 return "var(--spice-highlight)"
341341 },
342342 },
343343 {
344344 Name : "CSS: --spice-highlight-elevated" ,
345- Regex : "#2a2a2a" ,
345+ Regex : "\b #2a2a2a\b " ,
346346 Replacement : func (submatches ... string ) string {
347347 return "var(--spice-highlight-elevated)"
348348 },
349349 },
350350 {
351351 Name : "CSS: --spice-sidebar" ,
352- Regex : "#(000|000000)" ,
352+ Regex : "#\b (000|000000)\b " ,
353353 Replacement : func (submatches ... string ) string {
354354 return "var(--spice-sidebar)"
355355 },
356356 },
357357 {
358358 Name : "CSS: --spice-text" ,
359- Regex : "white;|#fff|#ffffff|#f8f8f8" ,
359+ Regex : "\b ( white;|#fff|#ffffff|#f8f8f8) \b " ,
360360 Replacement : func (submatches ... string ) string {
361361 return "var(--spice-text)"
362362 },
363363 },
364364 {
365365 Name : "CSS: --spice-subtext" ,
366- Regex : "#(b3b3b3|a7a7a7)" ,
366+ Regex : "\b #(b3b3b3|a7a7a7)\b " ,
367367 Replacement : func (submatches ... string ) string {
368368 return "var(--spice-subtext)"
369369 },
370370 },
371371 {
372372 Name : "CSS: --spice-button" ,
373- Regex : "#(1db954|1877f2)" ,
373+ Regex : "\b #(1db954|1877f2)\b " ,
374374 Replacement : func (submatches ... string ) string {
375375 return "var(--spice-button)"
376376 },
377377 },
378378 {
379379 Name : "CSS: --spice-button-active" ,
380- Regex : "#(1ed760|1fdf64|169c46)" ,
380+ Regex : "\b #(1ed760|1fdf64|169c46)\b " ,
381381 Replacement : func (submatches ... string ) string {
382382 return "var(--spice-button-active)"
383383 },
384384 },
385385 {
386386 Name : "CSS: --spice-button-disabled" ,
387- Regex : "#535353" ,
387+ Regex : "\b #535353\b " ,
388388 Replacement : func (submatches ... string ) string {
389389 return "var(--spice-button-disabled)"
390390 },
391391 },
392392 {
393393 Name : "CSS: --spice-tab-active" ,
394- Regex : "#(333|333333)" ,
394+ Regex : "\b #(333|333333)\b " ,
395395 Replacement : func (submatches ... string ) string {
396396 return "var(--spice-tab-active)"
397397 },
398398 },
399399 {
400400 Name : "CSS: --spice-misc" ,
401- Regex : "#7f7f7f" ,
401+ Regex : "\b #7f7f7f\b " ,
402402 Replacement : func (submatches ... string ) string {
403403 return "var(--spice-misc)"
404404 },
405405 },
406406 {
407407 Name : "CSS: --spice-notification" ,
408- Regex : "#(4687d6|2e77d0)" ,
408+ Regex : "\b #(4687d6|2e77d0)\b " ,
409409 Replacement : func (submatches ... string ) string {
410410 return "var(--spice-notification)"
411411 },
412412 },
413413 {
414414 Name : "CSS: --spice-notification-error" ,
415- Regex : "#(e22134|cd1a2b)" ,
415+ Regex : "\b #(e22134|cd1a2b)\b " ,
416416 Replacement : func (submatches ... string ) string {
417417 return "var(--spice-notification-error)"
418418 },
0 commit comments