Show newer

配色好难处理啊,MDC的primaryColor和secondaryColor到底是怎么调出来的?目前只能做到这个水平了 :milkbear_035:

const image = new Image();
image.crossOrigin = "anonymous";
image.src = this.$props.song.thumbnail;
image.addEventListener("load", async (event) => {
  const colorThief = new ColorThief();
  let color = await colorThief.getColor(image);
  const contrast = chroma.contrast(chroma(...color).hex(), "#ffffff");
  if (contrast < 4) return;
  this.primaryColor = chroma(...color).hex();
  this.secondaryColor = chroma(...color)
    .brighten()
    .hex();
  this.darkColor = chroma(...color)
    .darken()
    .hex();
  this.lightColor = chroma(...color)
    .brighten(2.5)
    .hex();
});

vis4.net/chromajs

各位有没有播放器ui设计推荐?behance翻遍了没找到灵感 :milkbear_017:

需求:类似mastodon这样的可以显示在网页上的播放器组件👇,不过需要放进更复杂的功能,比如歌词和播放列表

Well, I've reverted this, actually accepting both features :)

Show thread

打了一个通宵
这关是真恶心,容错率太低

Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。