-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scope umbra to the entire color picker not just the pallet
- Loading branch information
1 parent
1272fcc
commit 76abb4a
Showing
13 changed files
with
388 additions
and
58 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import DyePicker from './components/DyePicker.vue' | ||
</script> | ||
|
||
<template> | ||
<DyePicker default="#36576a" /> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@import './css'; | ||
</style> |
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
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
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
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
// @ts-ignore | ||
import nearestColor from 'nearest-color'; | ||
import {c} from './colornames'; //'color-name-list' | ||
import nearestColor from 'nearest-color' | ||
import { c } from './colornames' //'color-name-list' | ||
|
||
type nearestType = (hex: string) => { | ||
name: string; | ||
name: string | ||
value: string | ||
}; | ||
} | ||
|
||
// @ts-ignore | ||
const colors = c.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {}); | ||
const nearest: nearestType = nearestColor.from(colors); | ||
const colors = c.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {}) | ||
const nearest: nearestType = nearestColor.from(colors) | ||
|
||
export function colorName(h: string) { | ||
return (hex: string = h) => nearest(hex); | ||
} | ||
return (hex: string = h) => nearest(hex) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
:root { | ||
--block-size: 3em; | ||
--block-inner-size: calc(var(--block-size) - var(--space-s)); | ||
|
||
--border-size: 1px; | ||
--border-color: var(--base-120); | ||
--border-style: solid; | ||
--border: var(--border-size) var(--border-style) var(--border-color); | ||
} | ||
|
||
.page { | ||
margin: auto; | ||
max-width: calc(100vw - var(--space-xl)); | ||
width: 1300px; | ||
transition: background 0.4s ease-in-out; | ||
|
||
@media (max-width: 500px) { | ||
max-width: calc(100vw); | ||
} | ||
} | ||
|
||
.block { | ||
display: flex; | ||
align-items: center; | ||
height: var(--block-size); | ||
padding: 0px var(--space-s); | ||
} | ||
|
||
.rounded { | ||
border-radius: var(--radius); | ||
} | ||
|
||
.border { | ||
border: var(--border); | ||
border-radius: var(--radius); | ||
} | ||
|
||
.panel { | ||
border-radius: var(--radius); | ||
//padding: var(--space-m); | ||
background-color: var(--base-10); | ||
} | ||
|
||
.compact-panel { | ||
border-radius: var(--radius); | ||
padding: var(--space-s); | ||
background-color: var(--base-10); | ||
} | ||
|
||
.post-flex { | ||
display: flex; | ||
gap: var(--space-s); | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.color-flip { | ||
filter: invert(90); | ||
img, | ||
.img { | ||
filter: invert(1); | ||
&::after { | ||
filter: invert(90); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
html { | ||
background: var(--base); | ||
color: var(--base-120); | ||
} | ||
|
||
:root { | ||
--background: #0c0915; | ||
--background-10: #1e1a23; | ||
--background-20: #423b40; | ||
--foreground: #c0aea3; | ||
--foreground-10: #9c8d87; | ||
--foreground-20: #665c5c; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
button { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
background: transparent; | ||
cursor: pointer; | ||
border: none; | ||
outline: none; | ||
padding: 0px; | ||
padding: 0.5rem 2rem; | ||
} | ||
|
||
button:not(.plain) { | ||
background: var(--base-10); | ||
border-radius: var(--radius); | ||
border: 0px var(--border-style) var(--base-100); | ||
|
||
min-width: var(--block-inner-size); | ||
min-height: var(--block-inner-size); | ||
max-height: var(--block-inner-size); | ||
} | ||
|
||
button.primary { | ||
min-width: var(--block-size); | ||
min-height: var(--block-size); | ||
max-height: var(--block-size); | ||
} | ||
|
||
button.active { | ||
background: var(--accent-20); | ||
color: var(--accent); | ||
} | ||
|
||
button:disabled { | ||
background: var(--base-110); | ||
color: var(--base-100); | ||
cursor: not-allowed; | ||
pointer-events: none; | ||
} | ||
|
||
button:focus button:active { | ||
outline: 0px; | ||
} | ||
|
||
button:focus:not(.plain), | ||
button:active:not(.plain), | ||
textarea:focus:not(.plain), | ||
textarea:active:not(.plain), | ||
.focus:focus:not(.plain), | ||
.focus:active:not(.plain) { | ||
outline: 2px var(--border-style) var(--accent); | ||
} | ||
|
||
img { | ||
object-fit: cover; | ||
} | ||
|
||
.ProseMirror { | ||
position: relative; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@import "./block.scss"; | ||
@import "./spaces"; | ||
@import "./color"; | ||
@import "./type"; | ||
@import "./elements"; | ||
|
||
/* | ||
1. Use a more-intuitive box-sizing model. | ||
*/ | ||
*, *::before, *::after { | ||
box-sizing: border-box; | ||
margin: 0; | ||
} | ||
/* | ||
3. Allow percentage-based heights in the application | ||
*/ | ||
html, body { | ||
height: 100%; | ||
overflow-x: hidden; | ||
transition: background .8s ease-in-out; | ||
} | ||
/* | ||
6. Improve media defaults | ||
*/ | ||
img, picture, video, canvas, svg { | ||
display: block; | ||
max-width: 100%; | ||
} | ||
|
||
img { | ||
background: var(--accent); | ||
} | ||
/* | ||
7. Remove built-in form typography styles | ||
*/ | ||
input, button, textarea, select { | ||
font: inherit; | ||
} | ||
/* | ||
8. Avoid text overflows | ||
*/ | ||
p, h1, h2, h3, h4, h5, h6 { | ||
overflow-wrap: break-word; | ||
} | ||
/* | ||
9. Create a root stacking context | ||
*/ | ||
#root, #__next { | ||
isolation: isolate; | ||
} |
Oops, something went wrong.