scalableminds / webknossos

Visualize, share and annotate your large 3D images online
https://webknossos.org
GNU Affero General Public License v3.0
127 stars 24 forks source link

Introduce small color palette module in frontend #8150

Open MichaelBuessemeyer opened 2 weeks ago

MichaelBuessemeyer commented 2 weeks ago

Detailed Description

In some parts of the frontend code we use the CSS color variables (and maybe also other CSS variables defined by antd). The constants could become its own module in the frontend so that one can use ColorPalette.PRIMARY_COLOR and so in the code without looking up the exact string of the variable "var(--ant-color-primary)".

Context

I just came up with this little refactoring idea while seeing @dieknolle3333 changes https://github.com/scalableminds/webknossos/pull/8123/commits/9d829da0d79e8448cbd8259e3d95ce5cb394a8f6