preferredContrast

Readable prefers-contrast media query.

Demo

Preferred contrast: no-preference

Usage

<script lang="ts">
import { preferredContrast } from "svelte-legos";

const contrast = preferredContrast();

// $contrast => "more" | "less" | "custom" | "no-preference"
</script>