-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Update color tool banner image and project name
- Loading branch information
1 parent
04a8441
commit a2415b6
Showing
2 changed files
with
68 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,10 +29,10 @@ | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/beer.min.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="./style.css"> | ||
|
||
<script> | ||
<!-- <script> | ||
if ('serviceWorker' in navigator) | ||
window.addEventListener('load', () => navigator.serviceWorker.register('/service-worker.js')) | ||
</script> | ||
</script> --> | ||
<script type="importmap"> | ||
{ "imports": { | ||
"alpinejs": "https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.11.1/module.esm.min.js" | ||
|
@@ -133,7 +133,7 @@ <h1>picker</h1> | |
</div> | ||
</template> | ||
<nav class="grid"> | ||
<div x-bind="getDisplayBind('color')" class="s12 l6 field round border ratio-3-1" style="background-color: #FFFFFF;"> | ||
<div x-bind="getDisplayBind('color')" class="s12 l6 field round border ratio-3-1 smooth-color" style="background-color: #FFFFFF;"> | ||
<span class="helper font-mono surface">hex</span> | ||
<input type="text" value="#FFFFFF" x-ref="colorInput" x-model="hex" class="font-mono text-extra"> | ||
<button class="circle large transparent absolute middle right"> | ||
|
@@ -144,10 +144,10 @@ <h1>picker</h1> | |
<div class="s m s12"></div> | ||
<nav class="s8 l4 field ratio-2-1 no-space"> | ||
<span class="helper font-mono">complementary (±137°)</span> | ||
<button @click="setColor(complementary1)" x-bind="getDisplayBind('complementary1')" x-text="complementary1.hex" class="responsive w-half h-full p-0 no-elevate left-round font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(complementary2)" x-bind="getDisplayBind('complementary2')" x-text="complementary2.hex" class="responsive w-half h-full p-0 no-elevate right-round font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(complementary1)" x-bind="getDisplayBind('complementary1')" x-text="complementary1.hex" class="responsive w-half h-full p-0 no-elevate left-round font-mono text-medium smooth-color">#FFFFFF</button> | ||
<button @click="setColor(complementary2)" x-bind="getDisplayBind('complementary2')" x-text="complementary2.hex" class="responsive w-half h-full p-0 no-elevate right-round font-mono text-medium smooth-color">#FFFFFF</button> | ||
</nav> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
<div class="s4 l2 field fill round ratio-square smooth-color"> | ||
<span class="helper font-mono">random</span> | ||
<button @click="setRandomColor()" x-bind="getDisplayBind('randomColor')" x-text="randomColor.hex" class="responsive h-full m-0 no-elevate font-mono text-medium">#FFFFFF</button> | ||
</div> | ||
|
@@ -178,21 +178,21 @@ <h1>picker</h1> | |
<span class="helper font-mono">hue:<b x-text="Math.round(hue) + '°'">180°</b></span> | ||
<label class="slider max vertical" :style="{color: hueDisplay.hex}"> | ||
<input x-model.number="hue" type="range" min="0" max="360" step="1" value="180"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
<span class="helper font-mono">chroma:<b x-text="Math.round(chroma * 100)">0</b></span> | ||
<label class="slider max vertical" :style="{color: chromaDisplay.hex}"> | ||
<input x-model.number="chroma" type="range" min="0" max="1" :step="1/100" value="0"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
<span class="helper font-mono">light:<b x-text="Math.round(light * 100)">100</b></span> | ||
<label class="slider max vertical" style="color: currentcolor;"> | ||
<input x-model.number="light" type="range" min="0" max="1" :step="1/100"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
</nav> | ||
|
@@ -205,40 +205,49 @@ <h2>color blindness</h2> | |
<nav class="grid"> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">normal</span> | ||
<button @click="setColor(color)" x-bind="getDisplayBind('color')" x-text="color.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(color)" x-bind="getDisplayBind('color')" x-text="color.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">deuteranopia</span> | ||
<button @click="setColor(deuteranopia)" x-bind="getDisplayBind('deuteranopia')" x-text="deuteranopia.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(deuteranopia)" x-bind="getDisplayBind('deuteranopia')" x-text="deuteranopia.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">protanopia</span> | ||
<button @click="setColor(protanopia)" x-bind="getDisplayBind('protanopia')" x-text="protanopia.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(protanopia)" x-bind="getDisplayBind('protanopia')" x-text="protanopia.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
<div class="s m s12"></div> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">tritanopia</span> | ||
<button @click="setColor(tritanopia)" x-bind="getDisplayBind('tritanopia')" x-text="tritanopia.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(tritanopia)" x-bind="getDisplayBind('tritanopia')" x-text="tritanopia.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">achromatomaly</span> | ||
<button @click="setColor(achromatomaly)" x-bind="getDisplayBind('achromatomaly')" x-text="achromatomaly.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(achromatomaly)" x-bind="getDisplayBind('achromatomaly')" x-text="achromatomaly.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
<div class="s4 m2 field fill round ratio-2-1"> | ||
<span class="helper font-mono">achromatopsia</span> | ||
<button @click="setColor(achromatopsia)" x-bind="getDisplayBind('achromatopsia')" x-text="achromatopsia.hex" class="responsive h-full m-0 font-mono text-medium">#FFFFFF</button> | ||
<button @click="setColor(achromatopsia)" x-bind="getDisplayBind('achromatopsia')" x-text="achromatopsia.hex" class="responsive h-full m-0 font-mono text-medium smooth-color">#FFFFFF</button> | ||
</div> | ||
</nav> | ||
<div class="medium-space"></div> | ||
<div class="medium-divider"></div> | ||
</section> | ||
|
||
<section> | ||
<h2>accessibility</h2> | ||
<header class="transparent p-0"> | ||
<nav> | ||
<h2>accessibility</h2> | ||
<div class="max"></div> | ||
<button @click="enhanceContrast()" class="transparent small-round vertical"> | ||
<i>flare</i> | ||
<span>enhance</span> | ||
</button> | ||
</nav> | ||
</header> | ||
<nav class="grid"> | ||
<div class="s12 m6 field fill round ratio-3-1"> | ||
<span class="helper font-mono">preview (click to swap)</span> | ||
<button @click="swapBackgroundForegroud()" class="responsive h-full font-mono" :style="{'background-color': background.hex, color: foreground.hex}" style="--color: #CCCCCC; color: #333333; margin: 0"> | ||
<button @click="swapBackgroundForegroud()" class="responsive h-full font-mono smooth-color" :style="{'background-color': background.hex, color: foreground.hex}" style="--color: #CCCCCC; color: #333333; margin: 0"> | ||
<i class="fill extra">change_history</i> | ||
<i class="extra">change_history</i> | ||
<i class="fill extra">square</i> | ||
|
@@ -250,12 +259,18 @@ <h2>accessibility</h2> | |
<div class="s m s12"></div> | ||
<nav class="s8 m4 field ratio-2-1 no-space"> | ||
<span class="helper font-mono">subject</span> | ||
<button @click="setBackgroundColor()" x-bind="getDisplayBind('background')" class="responsive w-half h-full p-0 left-round text-medium">background</button> | ||
<button @click="setForegroundColor()" x-bind="getDisplayBind('foreground')" class="responsive w-half h-full p-0 right-round text-medium">foreground</button> | ||
<button @click="setBackgroundColor()" x-bind="getDisplayBind('background')" class="responsive w-half h-full p-0 left-round text-medium smooth-color" style="position: relative;">background</button> | ||
<button @click="setForegroundColor()" x-bind="getDisplayBind('foreground')" class="responsive w-half h-full p-0 right-round text-medium smooth-color">foreground</button> | ||
<button @click="setColor(background)" x-bind="getDisplayBind('background')" class="circle absolute bottom left transparent margin smooth-color" style="z-index: 2;"> | ||
<i>colorize</i> | ||
</button> | ||
<button @click="setColor(foreground)" x-bind="getDisplayBind('foreground')" class="circle absolute bottom right transparent margin smooth-color" style="z-index: 2;"> | ||
<i>colorize</i> | ||
</button> | ||
</nav> | ||
<div class="s4 m2 field fill round ratio-square"> | ||
<span class="helper font-mono">grade <strong x-text="contrastDisplay">65:8</strong></span> | ||
<button class="responsive h-full m-0 font-mono text-extra center-text" x-bind="getDisplayBind('contrastGradeDisplay')" x-text="contrastGrade">AAA</button> | ||
<button x-bind="getDisplayBind('contrastGradeDisplay')" x-text="contrastGrade" class="responsive h-full m-0 font-mono text-extra center-text smooth-color">AAA</button> | ||
</div> | ||
</nav> | ||
<div class="medium-space"></div> | ||
|
@@ -298,14 +313,14 @@ <h2>fades</h2> | |
<span class="helper font-mono">darken chroma:<b x-text="Math.round(darkChroma * 100)">100</b></span> | ||
<label class="slider max vertical" :style="{color: darkChromaDisplay.hex}"> | ||
<input x-model.number="darkChroma" type="range" min="-1" max="1" :step="1/100"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
<span class="helper font-mono">darkness:<b x-text="Math.round(darkLevel * 100)">100</b></span> | ||
<label class="slider max vertical" style="color: currentcolor;"> | ||
<input x-model.number="darkLevel" type="range" min="0" max="1" :step="1/100"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s12"></div> | ||
|
@@ -321,14 +336,14 @@ <h2>fades</h2> | |
<span class="helper font-mono">lighten hue:<b x-text="lightHue">0</b></span> | ||
<label class="slider max vertical" :style="{color: lightHueDisplay.hex}"> | ||
<input x-model.number="lightHue" type="range" min="-360" max="360"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
<span class="helper font-mono">lighten chroma:<b x-text="Math.round(lightChroma * 100)">100</b></span> | ||
<label class="slider max vertical" :style="{color: lightChromaDisplay.hex}"> | ||
<input x-model.number="lightChroma" type="range" min="-1" max="1" :step="1/100"> | ||
<span></span> | ||
<span class="smooth-color"></span> | ||
</label> | ||
</div> | ||
<div class="s4 l2 field fill round ratio-square"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters