diff options
| author | bobzel <zzzman@gmail.com> | 2023-08-21 12:21:36 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-08-21 12:21:36 -0400 |
| commit | bb11b2e0106ebd802e9ea4adc21f2891774ee634 (patch) | |
| tree | 15bd807f2a6f29d070295f99c935df15c035bef6 /src/client/views/nodes/ColorBox.tsx | |
| parent | eb35837e5ffe8e7eba9decea1fae5c163528dc1e (diff) | |
| parent | f5ead5e05a7c93463a4887efc521de882a189cfc (diff) | |
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/nodes/ColorBox.tsx')
| -rw-r--r-- | src/client/views/nodes/ColorBox.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/views/nodes/ColorBox.tsx b/src/client/views/nodes/ColorBox.tsx index aae759702..1b6fe5748 100644 --- a/src/client/views/nodes/ColorBox.tsx +++ b/src/client/views/nodes/ColorBox.tsx @@ -14,6 +14,8 @@ import { ActiveInkColor, ActiveInkWidth, SetActiveInkColor, SetActiveInkWidth } import './ColorBox.scss'; import { FieldView, FieldViewProps } from './FieldView'; import { RichTextMenu } from './formattedText/RichTextMenu'; +import { ScriptingGlobals } from '../../util/ScriptingGlobals'; +import { DashColor } from '../../../Utils'; @observer export class ColorBox extends ViewBoxBaseComponent<FieldViewProps>() { @@ -81,3 +83,10 @@ export class ColorBox extends ViewBoxBaseComponent<FieldViewProps>() { ); } } + + +ScriptingGlobals.add( + function interpColors(c1:string, c2:string, weight=0.5) { + return DashColor(c1).mix(DashColor(c2),weight) + } +)
\ No newline at end of file |
