# Colour, shape and images

`color:` is the background. Colours have names (`red`, `teal`, `gray`…), shades from 50 (light)
to 900 (dark) like `blue[600]`, or `rgb(r, g, b)` with an optional fourth number from 0
(see-through) to 1 (solid). A hex colour goes in quotes: `"#FF6B6B"`.

```vi
main swatches:
  arrange: row, center
  space_between: 10
  children:
    named:
      size: 20
      color: coral
      shape: circle
    shade:
      size: 20
      color: teal[700]
      shape: rounded
    mixed:
      size: 20
      color: rgb(255, 120, 0, 0.6)
      shadow: true
    faded:
      size: 20
      color: "#6B4EFF"
      see_through: 50
      outline: 2, purple[900]
```

| Attribute | Does |
|---|---|
| `shape:` | `square` (default), `rounded` or `circle` |
| `shadow: true` | a soft drop shadow |
| `see_through: 50` | 50 % see-through (0 is solid, 100 invisible) |
| `outline: 2, red` | a 2-point line round the edge; name sides for some: `outline: bottom 1, gray` |
| `visible: false` | hides it (and the space it took) |
| `image: @photo.jpg` | a picture behind the children; add `fill` to cover the box, `blurred` to blur it |

`@name` means a file in the project's `assets` folder: `@cat.png`, `@backgrounds/sky.jpg`.
Typing `@` lists the files. Web pictures go in quotes: `image: "https://…/photo.jpg"`.

```vi
main card:
  size: max, 40
  image: @hero.png, fill
  arrange: bottom left
  space_inside: 16
  children:
    caption:
      text: "Pictures come from the assets folder"
      text_style: 16, bold, white
```
