From 031d9f749508e5a18ee73ac0f73ce945cece1495 Mon Sep 17 00:00:00 2001 From: Maciej Caderek Date: Thu, 17 Feb 2022 04:11:36 +0100 Subject: [PATCH] WIP --- src/board/styles-board/index.ts | 2 +- src/board/styles-board/mono/lichess.ts | 2 +- src/board/styles-board/mono/mono.ts | 41 +++++++++++++++++++++++++ src/board/styles-board/mono/standard.ts | 14 ++++----- src/state.ts | 2 +- src/utils/colors.ts | 4 ++- 6 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 src/board/styles-board/mono/mono.ts diff --git a/src/board/styles-board/index.ts b/src/board/styles-board/index.ts index fea83e0..3595057 100644 --- a/src/board/styles-board/index.ts +++ b/src/board/styles-board/index.ts @@ -16,11 +16,11 @@ import rainbowLight from "./gradient/rainbow-light"; // import kittens from "./pic/kittens"; export default { + standard, chesscom, lichess, lila, peach, - standard, violet, avocado, calm, diff --git a/src/board/styles-board/mono/lichess.ts b/src/board/styles-board/mono/lichess.ts index 959ac4b..a27ece1 100644 --- a/src/board/styles-board/mono/lichess.ts +++ b/src/board/styles-board/mono/lichess.ts @@ -28,7 +28,7 @@ const style: Style = { border: { type: "solid", data: { - color: "#916655", + color: "#80634d", }, }, coords: { diff --git a/src/board/styles-board/mono/mono.ts b/src/board/styles-board/mono/mono.ts new file mode 100644 index 0000000..1be50ee --- /dev/null +++ b/src/board/styles-board/mono/mono.ts @@ -0,0 +1,41 @@ +import { Style } from "../../../types"; + +const style: Style = { + name: "Mono", + category: "mono", + background: { + type: "solid", + data: { + color: "transparent", + }, + }, + dark: { + type: "solid", + data: { + color: "#999", + }, + }, + light: { + type: "solid", + data: { + color: "#eee", + }, + }, + moveIndicator: { + type: "color", + data: "#0088ff66", + }, + border: { + type: "solid", + data: { + color: "#444", + }, + }, + coords: { + onLight: "#999", + onDark: "#eee", + onBorder: "#eee", + }, +}; + +export default style; diff --git a/src/board/styles-board/mono/standard.ts b/src/board/styles-board/mono/standard.ts index 1724cf7..bf60ee4 100644 --- a/src/board/styles-board/mono/standard.ts +++ b/src/board/styles-board/mono/standard.ts @@ -12,29 +12,29 @@ const style: Style = { dark: { type: "solid", data: { - color: "#999", + color: "#10ad88", }, }, light: { type: "solid", data: { - color: "#eee", + color: "#aae4d7", }, }, moveIndicator: { type: "color", - data: "#0088ff66", + data: "#ffff0055", }, border: { type: "solid", data: { - color: "#444", + color: "#00735a", }, }, coords: { - onLight: "#999", - onDark: "#eee", - onBorder: "#eee", + onLight: "#00735a", + onDark: "#d4fff5", + onBorder: "#bbfaec", }, }; diff --git a/src/state.ts b/src/state.ts index 539d7d4..6c5fcbf 100644 --- a/src/state.ts +++ b/src/state.ts @@ -8,7 +8,7 @@ const mobile = isMobile(); const boardConfig: BoardConfig = { size: 1024, tiles: 8, - boardStyle: "calm", + boardStyle: "standard", piecesStyle: "tatiana", showBorder: !mobile, showExtraInfo: true, diff --git a/src/utils/colors.ts b/src/utils/colors.ts index 263d705..5c43f25 100644 --- a/src/utils/colors.ts +++ b/src/utils/colors.ts @@ -63,7 +63,9 @@ const changeHSL = ( const [r, g, b] = chunk( colorHex.length === 4 ? 1 : 2, colorHex.slice(1).split("") - ).map((x) => parseInt(x.join(""), 16)); + ).map((x) => { + return parseInt(x.join(""), 16); + }); let [h, s, l] = rgb2hsl(r, g, b); const absDelta = Math.abs(deltaH);