fix(editor): adjust highlighter color (#11300)
Closes: [BS-2980](https://linear.app/affine-design/issue/BS-2980/highlighter透明度改为30percent) [BS-2979](https://linear.app/affine-design/issue/BS-2979/highlighter默认选择颜色为蓝色)
This commit is contained in:
@@ -73,7 +73,7 @@ export class EdgelessPenMenu extends EdgelessToolbarToolMixin(
|
|||||||
private readonly _onPickColor = (e: ColorEvent) => {
|
private readonly _onPickColor = (e: ColorEvent) => {
|
||||||
let color = e.detail.value;
|
let color = e.detail.value;
|
||||||
if (this.pen$.peek() === 'highlighter') {
|
if (this.pen$.peek() === 'highlighter') {
|
||||||
color = adjustColorAlpha(color, 0.5);
|
color = adjustColorAlpha(color, 0.3);
|
||||||
}
|
}
|
||||||
this.onChange({ color });
|
this.onChange({ color });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export const highlighterToolbarConfig = {
|
|||||||
);
|
);
|
||||||
const onPick = (e: PickColorEvent) => {
|
const onPick = (e: PickColorEvent) => {
|
||||||
if (e.type === 'pick') {
|
if (e.type === 'pick') {
|
||||||
const color = adjustColorAlpha(e.detail.value, 0.5);
|
const color = adjustColorAlpha(e.detail.value, 0.3);
|
||||||
for (const model of models) {
|
for (const model of models) {
|
||||||
const props = packColor(field, color);
|
const props = packColor(field, color);
|
||||||
ctx.std
|
ctx.std
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ export const DefaultTheme: Theme = {
|
|||||||
shapeFillColor: Medium.Yellow,
|
shapeFillColor: Medium.Yellow,
|
||||||
connectorColor: Medium.Grey,
|
connectorColor: Medium.Grey,
|
||||||
noteBackgrounColor: NoteBackgroundColorMap.White,
|
noteBackgrounColor: NoteBackgroundColorMap.White,
|
||||||
// 50% transparent `Default.black`
|
// 30% transparent `Medium.Blue`
|
||||||
hightlighterColor: { dark: '#ffffff80', light: '#00000080' },
|
hightlighterColor: '#84cfff4d',
|
||||||
Palettes,
|
Palettes,
|
||||||
ShapeTextColorPalettes,
|
ShapeTextColorPalettes,
|
||||||
NoteBackgroundColorMap,
|
NoteBackgroundColorMap,
|
||||||
|
|||||||
Reference in New Issue
Block a user