summaryrefslogtreecommitdiff
path: root/documentation/USAGE.md
blob: 380ce4e733bd41f05ac013a2daed458d182f0821 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Usage

I love Deno. URL imports are cool. Anyhoo, you can do the same with uchū:

- `https://uchu.style/color.css`
- `https://uchu.style/color_expanded.css`



## Pure

If you're coding a website by hand, you probably want to use the reduced palette. Or not, whatever.

```html
<!DOCTYPE html>
<html lang="your language code">
  <head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="https://uchu.style/color.css" rel="stylesheet"/>

    <style>
      body {
        background-color: var(--uchu-yang);
        color: var(--uchu-yin);
      }
    </style>
  </head>

  <body>
    <section>
      <p>My background is slightly off-white and my text color is a nuanced black.</p>
    </section>
  </body>
</html>
```



## Svelte/SvelteKit

If you're coding a web app, you probably want to use the expanded palette. Or not, whatever.

```svelte
<script lang="ts">
  // this example is using Svelte but probably applies to others as well
</script>

<style lang="scss">
  @import url("https://uchu.style/color_expanded.css");

  section {
    background-color: var(--uchu-yang);

    p {
      color: var(--uchu-yin-9);
    }
  }
</style>

<section>
  <p>My background is slightly off-white and my text color is a nuanced black.</p>
</section>
```