mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 08:47:16 -04:00
fix issue 9679
This commit is contained in:
parent
37ad85cbaf
commit
dda2d279cc
@ -107,6 +107,14 @@ export const DEFAULT_ELEMENT_BACKGROUND_PICKS = [
|
|||||||
] as ColorTuple;
|
] as ColorTuple;
|
||||||
|
|
||||||
// ORDER matters for positioning in quick picker
|
// ORDER matters for positioning in quick picker
|
||||||
|
export const DEFAULT_CANVAS_BACKGROUND_PICKS_DARK = [
|
||||||
|
"#121212", // radix slate1
|
||||||
|
"#1e1e1e", // radix slate2
|
||||||
|
"#2c2c2c", // radix slate3
|
||||||
|
"#383838", // radix slate4
|
||||||
|
"#444444", // radix slate5
|
||||||
|
] as ColorTuple;
|
||||||
|
|
||||||
export const DEFAULT_CANVAS_BACKGROUND_PICKS = [
|
export const DEFAULT_CANVAS_BACKGROUND_PICKS = [
|
||||||
COLOR_PALETTE.white,
|
COLOR_PALETTE.white,
|
||||||
// radix slate2
|
// radix slate2
|
||||||
@ -171,3 +179,4 @@ export const rgbToHex = (r: number, g: number, b: number) =>
|
|||||||
`#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;
|
`#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import { clamp, roundToStep } from "@excalidraw/math";
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_CANVAS_BACKGROUND_PICKS,
|
DEFAULT_CANVAS_BACKGROUND_PICKS,
|
||||||
|
DEFAULT_CANVAS_BACKGROUND_PICKS_DARK,
|
||||||
CURSOR_TYPE,
|
CURSOR_TYPE,
|
||||||
MAX_ZOOM,
|
MAX_ZOOM,
|
||||||
MIN_ZOOM,
|
MIN_ZOOM,
|
||||||
@ -74,7 +75,7 @@ export const actionChangeViewBackgroundColor = register({
|
|||||||
return (
|
return (
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
palette={null}
|
palette={null}
|
||||||
topPicks={DEFAULT_CANVAS_BACKGROUND_PICKS}
|
topPicks={appState.theme === THEME.DARK ? DEFAULT_CANVAS_BACKGROUND_PICKS_DARK : DEFAULT_CANVAS_BACKGROUND_PICKS}
|
||||||
label={t("labels.canvasBackground")}
|
label={t("labels.canvasBackground")}
|
||||||
type="canvasBackground"
|
type="canvasBackground"
|
||||||
color={appState.viewBackgroundColor}
|
color={appState.viewBackgroundColor}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user