Skip to content

Commit 3df4cec

Browse files
committed
Formatting
1 parent 599f298 commit 3df4cec

17 files changed

Lines changed: 104 additions & 94 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ['main']
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ['main']
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v7
14-
- uses: actions/setup-node@v6
15-
with:
16-
node-version: 24
17-
- run: npm ci
18-
- run: npm test
13+
- uses: actions/checkout@v7
14+
- uses: actions/setup-node@v6
15+
with:
16+
node-version: 24
17+
- run: npm ci
18+
- run: npm test

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ the best results overall, in terms of ergonomics and outputs.
4848

4949
Schemist is build upon these fabulous projects and resources:
5050

51-
- [SvelteKit](https://kit.svelte.dev/)
52-
- [Culori](https://github.com/Evercoder/culori) for the core
53-
color mechanics
54-
- [color-name-list](https://github.com/meodai/color-names) to
55-
name colors
56-
- [nearest-color](https://github.com/dtao/nearest-color) to find
57-
matching color names
58-
- [APCA](https://github.com/Myndex/apca-w3) to calculate
59-
contrast ratios
60-
- [Inter](https://rsms.me/inter/) for the main font
61-
- [Source code pro](https://fonts.adobe.com/fonts/source-code-pro)
62-
for monospace texts
63-
- [Font Squirrel generator](https://www.fontsquirrel.com/tools/webfont-generator)
64-
to subset Source code pro
51+
- [SvelteKit](https://kit.svelte.dev/)
52+
- [Culori](https://github.com/Evercoder/culori) for the core
53+
color mechanics
54+
- [color-name-list](https://github.com/meodai/color-names) to
55+
name colors
56+
- [nearest-color](https://github.com/dtao/nearest-color) to find
57+
matching color names
58+
- [APCA](https://github.com/Myndex/apca-w3) to calculate contrast
59+
ratios
60+
- [Inter](https://rsms.me/inter/) for the main font
61+
- [Source code pro](https://fonts.adobe.com/fonts/source-code-pro)
62+
for monospace texts
63+
- [Font Squirrel generator](https://www.fontsquirrel.com/tools/webfont-generator)
64+
to subset Source code pro
6565

6666
## Resources
6767

68-
- [Making a useful LCh color palette](https://ninedegreesbelow.com/photography/gimp-srgb-lch-color-palettes.html#saturation)
69-
- [Using LCh to pick complementary colors and for making hue-based color harmonies](https://ninedegreesbelow.com/photography/lch-complements-and-color-harmonies.html)
70-
- [How to Convert Temperature (K) to RGB: Algorithm and Sample Code](https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html)
68+
- [Making a useful LCh color palette](https://ninedegreesbelow.com/photography/gimp-srgb-lch-color-palettes.html#saturation)
69+
- [Using LCh to pick complementary colors and for making hue-based color harmonies](https://ninedegreesbelow.com/photography/lch-complements-and-color-harmonies.html)
70+
- [How to Convert Temperature (K) to RGB: Algorithm and Sample Code](https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html)

src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22

33
<html lang="en">
44
<head>

src/global.css

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ tbody tr:last-child td {
137137
border: 0;
138138
border-radius: var(--radius);
139139
padding: 0.5rem;
140-
box-shadow: inset 0 0 0 1px var(--fg-light),
140+
box-shadow:
141+
inset 0 0 0 1px var(--fg-light),
141142
inset 0 -2px 0 0 var(--fg-light);
142143
background: var(--bg-hard);
143144
color: var(--fg);
@@ -154,7 +155,9 @@ a.button {
154155
.button:hover,
155156
.button:focus,
156157
.button-trigger:focus + .button {
157-
box-shadow: 0 0 0 1px var(--fg), inset 0 0 0 1px var(--fg);
158+
box-shadow:
159+
0 0 0 1px var(--fg),
160+
inset 0 0 0 1px var(--fg);
158161
background: var(--bg-neutral);
159162
color: var(--fg);
160163
}
@@ -176,7 +179,9 @@ a.button {
176179
.button-trigger:checked + .button:focus,
177180
.button--active:hover,
178181
.button--active:focus {
179-
box-shadow: 0 0 0 1px var(--fg), inset 0 0 0 1px var(--bg);
182+
box-shadow:
183+
0 0 0 1px var(--fg),
184+
inset 0 0 0 1px var(--bg);
180185
}
181186

182187
.button:disabled {
@@ -257,7 +262,8 @@ input {
257262
input[type='text'],
258263
input[type='number'] {
259264
box-sizing: border-box;
260-
box-shadow: inset 0 0 0 1px var(--fg),
265+
box-shadow:
266+
inset 0 0 0 1px var(--fg),
261267
inset 0 0 0 1px var(--bg-soft);
262268
border-radius: calc(var(--radius) / 4);
263269
border: 0;
@@ -307,14 +313,16 @@ input[type='range'] {
307313
}
308314

309315
.elevated {
310-
box-shadow: 0 0.1rem 0.5rem 0 var(--shadow),
316+
box-shadow:
317+
0 0.1rem 0.5rem 0 var(--shadow),
311318
0 0.5rem 2rem 0 var(--shadow);
312319
transition: box-shadow ease-in 300ms;
313320
}
314321

315322
.elevated:hover,
316323
.elevated:focus-within {
317-
box-shadow: 0 0.1rem 0.5rem 0 var(--shadow),
324+
box-shadow:
325+
0 0.1rem 0.5rem 0 var(--shadow),
318326
0 0.5rem 2rem 0 var(--shadow),
319327
0 0.1rem 0.5rem 0 var(--shadow),
320328
0 0.5rem 2rem 0 var(--shadow);

src/lib/color/contrast.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ export const wcag2Grade = (level: number) =>
6161
level >= Wcag2Level.aaa
6262
? 'AAA'
6363
: level >= Wcag2Level.aa
64-
? 'AA'
65-
: level >= Wcag2Level.aa18
66-
? 'AA18'
67-
: 'KO';
64+
? 'AA'
65+
: level >= Wcag2Level.aa18
66+
? 'AA18'
67+
: 'KO';
6868

6969
export const wcag3Grade = (level: number) =>
7070
level >= Wcag3Level.all
7171
? '5'
7272
: level >= Wcag3Level.body
73-
? '4'
74-
: level >= Wcag3Level.large
75-
? '3'
76-
: level >= Wcag3Level.text
77-
? '2'
78-
: level >= Wcag3Level.nonText
79-
? '1'
80-
: '0';
73+
? '4'
74+
: level >= Wcag3Level.large
75+
? '3'
76+
: level >= Wcag3Level.text
77+
? '2'
78+
: level >= Wcag3Level.nonText
79+
? '1'
80+
: '0';
8181

8282
export const wcag2Contrast = (bg: RgbColor, fg: RgbColor) =>
8383
wcagContrast(rgbToCulori(bg), rgbToCulori(fg));

src/lib/color/formatting.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const formatSchemistTo = (
6969
format === 'hex'
7070
? formatSchemistToHex(color)
7171
: format === 'hsl'
72-
? formatHsl(schemistToHsl(color), precision)
73-
: format === 'lch'
74-
? formatLch(schemistToLch(color), precision)
75-
: formatRgb(schemistToRgb(color), precision);
72+
? formatHsl(schemistToHsl(color), precision)
73+
: format === 'lch'
74+
? formatLch(schemistToLch(color), precision)
75+
: formatRgb(schemistToRgb(color), precision);

src/lib/color/manipulation.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const scaleLightness = (
4949
h,
5050
targetH,
5151
Math.abs(amount / 100) * (hueShiftAmount / 100)
52-
)
52+
)
5353
: h
5454
});
5555

@@ -131,31 +131,31 @@ export const temperatureToHue = (kelvins: number): number => {
131131
329.698727446 *
132132
Math.pow(temperature - 60, -0.1332047592),
133133
255
134-
);
134+
);
135135

136136
const g =
137137
temperature <= 66
138138
? clamp(
139139
99.4708025861 * Math.log(temperature) -
140140
161.1195681661,
141141
255
142-
)
142+
)
143143
: clamp(
144144
288.1221695283 *
145145
Math.pow(temperature - 60, -0.0755148492),
146146
255
147-
);
147+
);
148148

149149
const b =
150150
temperature >= 66
151151
? 255
152152
: temperature <= 19
153-
? 0
154-
: clamp(
155-
138.5177312231 * Math.log(temperature - 10) -
156-
305.0447927307,
157-
255
158-
);
153+
? 0
154+
: clamp(
155+
138.5177312231 * Math.log(temperature - 10) -
156+
305.0447927307,
157+
255
158+
);
159159

160160
const color = rgbToSchemist({
161161
r: Math.round(r),

src/lib/components/Modal.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
max-width: 150ch;
5353
background: var(--bg) !important;
5454
color: var(--fg);
55-
box-shadow: 0 0.1rem 0.5rem 0 var(--shadow),
55+
box-shadow:
56+
0 0.1rem 0.5rem 0 var(--shadow),
5657
0 0.5rem 2rem 0 var(--shadow);
5758
}
5859

src/lib/components/Sample.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<style>
99
span {
1010
display: block;
11-
box-shadow: inset 0 -2px 0 0 var(--shadow),
11+
box-shadow:
12+
inset 0 -2px 0 0 var(--shadow),
1213
inset 0 -2px 0 0 var(--shadow);
1314
border-radius: var(--radius);
1415
}

src/lib/components/combinations/Combinations.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
There is no color combination matching the
5050
selected filters.
5151
<br />
52-
Try adding more colors to your palette or changing
53-
filters.
52+
Try adding more colors to your palette or changing filters.
5453
</p>
5554
{:else}
5655
<p>

0 commit comments

Comments
 (0)