mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
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) => {
|
||||
let color = e.detail.value;
|
||||
if (this.pen$.peek() === 'highlighter') {
|
||||
color = adjustColorAlpha(color, 0.5);
|
||||
color = adjustColorAlpha(color, 0.3);
|
||||
}
|
||||
this.onChange({ color });
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ export const highlighterToolbarConfig = {
|
||||
);
|
||||
const onPick = (e: PickColorEvent) => {
|
||||
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) {
|
||||
const props = packColor(field, color);
|
||||
ctx.std
|
||||
|
||||
@@ -124,8 +124,8 @@ export const DefaultTheme: Theme = {
|
||||
shapeFillColor: Medium.Yellow,
|
||||
connectorColor: Medium.Grey,
|
||||
noteBackgrounColor: NoteBackgroundColorMap.White,
|
||||
// 50% transparent `Default.black`
|
||||
hightlighterColor: { dark: '#ffffff80', light: '#00000080' },
|
||||
// 30% transparent `Medium.Blue`
|
||||
hightlighterColor: '#84cfff4d',
|
||||
Palettes,
|
||||
ShapeTextColorPalettes,
|
||||
NoteBackgroundColorMap,
|
||||
|
||||
Reference in New Issue
Block a user