contrast

Easily calculate color contrast ratios  https://p.ce9e.org/contrast/
git clone https://git.ce9e.org/contrast.git

commit
95e175ded83fc0f09cc5940577234a33b71bb33e
parent
576ecafe14bb97c13a746fa88e7c785755cbc774
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-05-04 16:38
link to WCAG

Diffstat

M index.html 1 +
M style.css 4 ++++

2 files changed, 5 insertions, 0 deletions


diff --git a/index.html b/index.html

@@ -26,6 +26,7 @@
   26    26 
   27    27 	<div id="display">
   28    28 		<p>This sample text attempts to visually demonstrate how readable this color combination is, for normal, <i>italic</i>, <b>bold</b>, or <small>small</small> text.</p>
   -1    29 		<p><a href="https://www.w3.org/TR/WCAG/#contrast-minimum">WCAG 2.1 on contrast ratio</a></p>
   29    30 	</div>
   30    31 
   31    32 	<script src="contrast.js" type="module"></script>

diff --git a/style.css b/style.css

@@ -80,6 +80,10 @@ body {
   80    80 	margin-inline: auto;
   81    81 }
   82    82 
   -1    83 #display a {
   -1    84 	color: inherit;
   -1    85 }
   -1    86 
   83    87 .gradient {
   84    88 	display: flex;
   85    89 	block-size: 5em;