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