#import "sns_polylux_template.typ": *
#import "figures.typ": figures, get_figure

#let pirat-color = (
  black: rgb("#000000"),
  white: rgb("#FFFFFF"),
  red: rgb("#E33d1C"),
  blue: rgb("#4AC3CB"),
)

#let sns-polylux-template_sns-pirat = (
pirat-color.blue.darken(30%), //rgb("#00728D"),
pirat-color.blue.darken(50%),
pirat-color.blue.darken(80%),
rgb("#AB3502"),
rgb("#E69426"),
pirat-color.red,
)


#let colortest = [
  #for th in (
    sns-polylux-template_sns-pirat,
    sns-polylux-template_sns-colormap, 
    sns-polylux-template_unipi-colormap, 
  ) {
    stack(dir: ltr, ..for c in th {
      (rect(width: 30pt, height: 30pt, fill: c),)
    })
  }
]

#let ghost(img, dx: 0pt, dy: 0pt, height: 100pt, ..args,) = context {
  let img = image(img, height: height)
  let s = measure(img)
  let hx = s.width / 2
  let hy = s.height / 2

  place(
    bottom + left,
    dx: dx - hx,
    dy: -dy + hy,
    ..args,
    img
  )
}

#let ghost-1 = ghost.with("imgs/ghosts/ghost-1.png")
#let ghost-2 = ghost.with("imgs/ghosts/ghost-2.png")
#let ghost-3 = ghost.with("imgs/ghosts/ghost-3.png")
#let ghost-4 = ghost.with("imgs/ghosts/ghost-4.png")
#let ghost-5 = ghost.with("imgs/ghosts/ghost-5.png")
#let ghost-6 = ghost.with("imgs/ghosts/ghost-6.png")
#let ghost-7 = ghost.with("imgs/ghosts/ghost-7.png")
#let eye-1 = ghost.with("imgs/ghosts/eye-1.png")
#let eye-2 = ghost.with("imgs/ghosts/eye-2.png")
#let eye-3 = ghost.with("imgs/ghosts/eye-3.png")
#let eye-4 = ghost.with("imgs/ghosts/eye-4.png")
