asciify-engine 1.0.59 → 1.0.60

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/dist/index.cjs CHANGED
@@ -909,8 +909,8 @@ function renderFrameToCanvas(ctx, frame, options, canvasWidth, canvasHeight, tim
909
909
  }
910
910
  }
911
911
  if (!hasTransparency) {
912
- const isInvertedBg = resolveInvert(options.invert);
913
- ctx.fillStyle = isInvertedBg ? "#faf9f7" : "#0a0a0a";
912
+ const isDarkScheme = typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches;
913
+ ctx.fillStyle = isDarkScheme ? "#0a0a0a" : "#faf9f7";
914
914
  ctx.fillRect(0, 0, canvasWidth, canvasHeight);
915
915
  }
916
916
  const cellW = canvasWidth / cols;