Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Centralize Studio colors (#8801)

Jonny Burger64317a460d2a
diff --git a/packages/studio/src/components/AssetSelector.tsx b/packages/studio/src/components/AssetSelector.tsx
index f2e7ef9909..c22e7d7b13 100644
--- a/packages/studio/src/components/AssetSelector.tsx
+++ b/packages/studio/src/components/AssetSelector.tsx
@@ -1,7 +1,7 @@
import React, {useCallback, useContext, useMemo, useState} from 'react';
import {writeStaticFile} from '../api/write-static-file';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {BACKGROUND, CLEAR_HOVER, LIGHT_TEXT} from '../helpers/colors';
+import {BACKGROUND, WHITE_ALPHA_06, LIGHT_TEXT} from '../helpers/colors';
import {buildAssetFolderStructure} from '../helpers/create-folder-tree';
import {toggleBooleanMapKey} from '../helpers/persist-boolean-map';
import {persistExpandedFolders} from '../helpers/persist-open-folders';
@@ -188,7 +188,7 @@ export const AssetSelector: React.FC<{
className="__remotion-vertical-scrollbar"
style={{
...list,
- backgroundColor: isDropDiv ? CLEAR_HOVER : BACKGROUND,
+ backgroundColor: isDropDiv ? WHITE_ALPHA_06 : BACKGROUND,
}}
onDragEnter={onDragEnter}
onDragLeave={onDragLeave}
diff --git a/packages/studio/src/components/AssetSelectorItem.tsx b/packages/studio/src/components/AssetSelectorItem.tsx
index b8789de62a..c3a46aa5df 100644
--- a/packages/studio/src/components/AssetSelectorItem.tsx
+++ b/packages/studio/src/components/AssetSelectorItem.tsx
@@ -13,9 +13,12 @@ import {deleteStaticFile} from '../api/delete-static-file';
import {StudioServerConnectionCtx} from '../helpers/client-id';
import {
BACKGROUND,
- CLEAR_HOVER,
+ WHITE_ALPHA_06,
+ CURRENT_COLOR,
LIGHT_TEXT,
SELECTED_BACKGROUND,
+ TRANSPARENT,
+ WHITE,
} from '../helpers/colors';
import {copyText} from '../helpers/copy-text';
import type {AssetFolder, AssetStructure} from '../helpers/create-folder-tree';
@@ -84,7 +87,7 @@ const labelStyle: React.CSSProperties = {
const revealIconStyle: React.CSSProperties = {
height: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
const AssetFolderItem: React.FC<{
@@ -131,14 +134,14 @@ const AssetFolderItem: React.FC<{
return {
...itemStyle,
paddingLeft: 4 + level * 8,
- backgroundColor: hovered ? CLEAR_HOVER : 'transparent',
+ backgroundColor: hovered ? WHITE_ALPHA_06 : TRANSPARENT,
};
}, [hovered, level]);
const label = useMemo(() => {
return {
...labelStyle,
- color: hovered ? 'white' : LIGHT_TEXT,
+ color: hovered ? WHITE : LIGHT_TEXT,
};
}, [hovered]);
@@ -153,7 +156,7 @@ const AssetFolderItem: React.FC<{
onDragEnter={onDragEnter}
onDragLeave={onDragLeave}
style={{
- backgroundColor: isDropDiv ? CLEAR_HOVER : BACKGROUND,
+ backgroundColor: isDropDiv ? WHITE_ALPHA_06 : BACKGROUND,
}}
>
<div
@@ -185,7 +188,7 @@ const AssetFolderItem: React.FC<{
}}
>
<Row>
- <Icon style={iconStyle} color={hovered ? 'white' : LIGHT_TEXT} />
+ <Icon style={iconStyle} color={hovered ? WHITE : LIGHT_TEXT} />
<Spacing x={1} />
<div style={label}>{item.name}</div>
</Row>
@@ -358,14 +361,14 @@ const AssetSelectorItem: React.FC<{
const style: React.CSSProperties = useMemo(() => {
return {
...itemStyle,
- color: hovered || selected ? 'white' : LIGHT_TEXT,
+ color: hovered || selected ? WHITE : LIGHT_TEXT,
backgroundColor: hovered
? selected
? SELECTED_BACKGROUND
- : CLEAR_HOVER
+ : WHITE_ALPHA_06
: selected
? SELECTED_BACKGROUND
- : 'transparent',
+ : TRANSPARENT,
paddingLeft: 12 + level * 8,
};
}, [hovered, level, selected]);
@@ -373,7 +376,7 @@ const AssetSelectorItem: React.FC<{
const label = useMemo(() => {
return {
...labelStyle,
- color: hovered || selected ? 'white' : LIGHT_TEXT,
+ color: hovered || selected ? WHITE : LIGHT_TEXT,
};
}, [hovered, selected]);
diff --git a/packages/studio/src/components/AudioWaveform.tsx b/packages/studio/src/components/AudioWaveform.tsx
index 88a053faeb..06cb3fc6e9 100644
--- a/packages/studio/src/components/AudioWaveform.tsx
+++ b/packages/studio/src/components/AudioWaveform.tsx
@@ -12,7 +12,7 @@ import {
import React, {useEffect, useMemo, useRef, useState} from 'react';
import type {LoopDisplay} from 'remotion';
import {Internals} from 'remotion';
-import {LIGHT_TRANSPARENT} from '../helpers/colors';
+import {WHITE_ALPHA_70, WHITE_ALPHA_60} from '../helpers/colors';
import {TIMELINE_BORDER} from '../helpers/timeline-layout';
const EMPTY_PEAKS = new Float32Array(0);
@@ -103,7 +103,7 @@ const drawLoopedWaveform = ({
drawBars({
canvas: targetCanvas,
peaks,
- color: 'rgba(255, 255, 255, 0.6)',
+ color: WHITE_ALPHA_60,
volume,
width: targetCanvas.width,
});
@@ -335,7 +335,7 @@ export const AudioWaveform: React.FC<{
drawBars({
canvas: canvasElement,
peaks: portionPeaks ?? EMPTY_PEAKS,
- color: 'rgba(255, 255, 255, 0.6)',
+ color: WHITE_ALPHA_60,
volume: parsedVolume,
width: w,
});
@@ -393,7 +393,7 @@ export const AudioWaveform: React.FC<{
context.lineTo(x, y);
}
});
- context.strokeStyle = LIGHT_TRANSPARENT;
+ context.strokeStyle = WHITE_ALPHA_70;
context.stroke();
}, [height, parsedVolume, shouldRenderVolumeOverlay, visualizationWidth]);
diff --git a/packages/studio/src/components/Button.tsx b/packages/studio/src/components/Button.tsx
index 8ea9f989c7..7309f1e2f0 100644
--- a/packages/studio/src/components/Button.tsx
+++ b/packages/studio/src/components/Button.tsx
@@ -1,16 +1,13 @@
import React, {forwardRef, useMemo} from 'react';
-import {
- INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
-} from '../helpers/colors';
+import {INPUT_BACKGROUND, BLACK_ALPHA_60, WHITE} from '../helpers/colors';
const button: React.CSSProperties = {
- border: `1px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
+ border: `1px solid ${BLACK_ALPHA_60}`,
borderRadius: 4,
backgroundColor: INPUT_BACKGROUND,
appearance: 'none',
fontFamily: 'inherit',
fontSize: 14,
- color: 'white',
+ color: WHITE,
flexDirection: 'row',
};
diff --git a/packages/studio/src/components/CanvasOrLoading.tsx b/packages/studio/src/components/CanvasOrLoading.tsx
index bdb2a8763a..6f6d4a7949 100644
--- a/packages/studio/src/components/CanvasOrLoading.tsx
+++ b/packages/studio/src/components/CanvasOrLoading.tsx
@@ -2,7 +2,7 @@ import type {Size} from '@remotion/player';
import React, {useContext, useEffect} from 'react';
import {Internals} from 'remotion';
import {ErrorLoader} from '../error-overlay/remotion-overlay/ErrorLoader';
-import {BACKGROUND} from '../helpers/colors';
+import {BACKGROUND, WHITE} from '../helpers/colors';
import {TimelineZoomCtx} from '../state/timeline-zoom';
import {Canvas} from './Canvas';
import {FramePersistor} from './FramePersistor';
@@ -18,7 +18,7 @@ import {ensureFrameIsInViewport} from './Timeline/timeline-scroll-logic';
import {ZoomPersistor} from './ZoomPersistor';
const container: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
flex: 1,
justifyContent: 'center',
alignItems: 'center',
diff --git a/packages/studio/src/components/CheckboardToggle.tsx b/packages/studio/src/components/CheckboardToggle.tsx
index 731ac52769..24fb4a3228 100644
--- a/packages/studio/src/components/CheckboardToggle.tsx
+++ b/packages/studio/src/components/CheckboardToggle.tsx
@@ -1,6 +1,6 @@
import React, {useCallback, useContext} from 'react';
import {NoReactInternals} from 'remotion/no-react';
-import {BLUE} from '../helpers/colors';
+import {BLUE, WHITE} from '../helpers/colors';
import {areKeyboardShortcutsDisabled} from '../helpers/use-keybinding';
import {CheckerboardContext} from '../state/checkerboard';
import {ControlButton} from './ControlButton';
@@ -39,7 +39,7 @@ export const CheckboardToggle: React.FC = () => {
style={{width: 16, height: 16}}
>
<path
- fill={checkerboard ? BLUE : 'white'}
+ fill={checkerboard ? BLUE : WHITE}
d="M480 0H32A32 32 0 0 0 0 32v448a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zm-32 256H256v192H64V256h192V64h192z"
/>
</svg>
diff --git a/packages/studio/src/components/Checkbox.tsx b/packages/studio/src/components/Checkbox.tsx
index 2f7d1adfcd..3b68a32413 100644
--- a/packages/studio/src/components/Checkbox.tsx
+++ b/packages/studio/src/components/Checkbox.tsx
@@ -1,8 +1,10 @@
import React, {useEffect, useMemo, useRef} from 'react';
import {
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
+ BLACK_ALPHA_60,
LIGHT_TEXT,
+ TRANSPARENT,
+ WHITE,
} from '../helpers/colors';
import {Checkmark} from '../icons/Checkmark';
@@ -66,7 +68,7 @@ export const Checkbox: React.FC<{
top: 0,
left: 0,
pointerEvents: 'none',
- color: 'white',
+ color: WHITE,
}),
[size],
);
@@ -74,8 +76,8 @@ export const Checkbox: React.FC<{
const input: React.CSSProperties = useMemo(() => {
return {
appearance: 'none',
- background: disabled ? 'transparent' : INPUT_BACKGROUND,
- border: '1px solid ' + INPUT_BORDER_COLOR_UNHOVERED,
+ background: disabled ? TRANSPARENT : INPUT_BACKGROUND,
+ border: '1px solid ' + BLACK_ALPHA_60,
height: size,
width: size,
top: 0,
diff --git a/packages/studio/src/components/ColorPicker/AlphaSlider.tsx b/packages/studio/src/components/ColorPicker/AlphaSlider.tsx
index ac73a2f1e2..697d2b3277 100644
--- a/packages/studio/src/components/ColorPicker/AlphaSlider.tsx
+++ b/packages/studio/src/components/ColorPicker/AlphaSlider.tsx
@@ -1,5 +1,10 @@
import React, {useCallback, useMemo, useRef} from 'react';
import {clamp, hsvToRgb} from '../../helpers/color-conversion';
+import {
+ BORDER_WHITE_2PX,
+ COLOR_PICKER_ALPHA_TRANSPARENT,
+ COLOR_PICKER_HANDLE_SHADOW,
+} from '../../helpers/colors';
import {
CHECKER_BACKGROUND_COLOR,
CHECKER_BACKGROUND_IMAGE,
@@ -47,7 +52,7 @@ export const AlphaSlider: React.FC<{
const gradientStyle: React.CSSProperties = useMemo(() => {
return {
...innerStyle,
- background: `linear-gradient(to right, rgba(0, 0, 0, 0), ${opaqueColor})`,
+ background: `linear-gradient(to right, ${COLOR_PICKER_ALPHA_TRANSPARENT}, ${opaqueColor})`,
};
}, [opaqueColor]);
@@ -103,8 +108,8 @@ export const AlphaSlider: React.FC<{
width: HANDLE_WIDTH,
height: SLIDER_HEIGHT + 4,
borderRadius: 2,
- border: '2px solid #fff',
- boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.6)',
+ border: BORDER_WHITE_2PX,
+ boxShadow: COLOR_PICKER_HANDLE_SHADOW,
pointerEvents: 'none',
};
}, [alpha]);
diff --git a/packages/studio/src/components/ColorPicker/ColorPicker.tsx b/packages/studio/src/components/ColorPicker/ColorPicker.tsx
index f4b838bfdc..6336831e83 100644
--- a/packages/studio/src/components/ColorPicker/ColorPicker.tsx
+++ b/packages/studio/src/components/ColorPicker/ColorPicker.tsx
@@ -2,7 +2,7 @@ import {PlayerInternals} from '@remotion/player';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import ReactDOM from 'react-dom';
import {formatRgba} from '../../helpers/color-conversion';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {CURRENT_COLOR, LIGHT_TEXT, TRANSPARENT} from '../../helpers/colors';
import {EyedropperIcon} from '../../icons/eyedropper';
import {HigherZIndex, useZIndex} from '../../state/z-index';
import {MENU_INITIATOR_CLASSNAME} from '../Menu/is-menu-item';
@@ -60,7 +60,7 @@ const controlStyle: React.CSSProperties = {
};
const eyedropperButtonBaseStyle: React.CSSProperties = {
- background: 'transparent',
+ background: TRANSPARENT,
border: 'none',
padding: 0,
margin: 0,
@@ -259,7 +259,7 @@ export const ColorPicker: React.FC<Props> = ({
...menuContainerTowardsBottom,
top: size.top + size.height + margin,
left,
- background: 'transparent',
+ background: TRANSPARENT,
boxShadow: 'none',
};
}
@@ -268,7 +268,7 @@ export const ColorPicker: React.FC<Props> = ({
...menuContainerTowardsTop,
bottom: size.windowSize.height - size.top + margin,
left,
- background: 'transparent',
+ background: TRANSPARENT,
boxShadow: 'none',
};
}, [opened, size]);
@@ -315,7 +315,7 @@ export const ColorPicker: React.FC<Props> = ({
title="Pick color from screen"
aria-label="Pick color from screen"
>
- <EyedropperIcon style={eyedropperIconStyle} color="currentColor" />
+ <EyedropperIcon style={eyedropperIconStyle} color={CURRENT_COLOR} />
</button>
) : null}
</span>
diff --git a/packages/studio/src/components/ColorPicker/ColorPickerPopup.tsx b/packages/studio/src/components/ColorPicker/ColorPickerPopup.tsx
index 5872f40d51..1167ce2d09 100644
--- a/packages/studio/src/components/ColorPicker/ColorPickerPopup.tsx
+++ b/packages/studio/src/components/ColorPicker/ColorPickerPopup.tsx
@@ -6,7 +6,16 @@ import {
rgbaToHsva,
type Hsva,
} from '../../helpers/color-conversion';
-import {INPUT_BACKGROUND, LIGHT_TEXT} from '../../helpers/colors';
+import {
+ BACKGROUND_HEX,
+ BORDER_BLACK_ALPHA_60,
+ COLOR_PICKER_POPUP_SHADOW,
+ CURRENT_COLOR,
+ INPUT_BACKGROUND,
+ LIGHT_TEXT,
+ TRANSPARENT,
+ WHITE,
+} from '../../helpers/colors';
import {EyedropperIcon} from '../../icons/eyedropper';
import {useZIndex} from '../../state/z-index';
import {AlphaSlider} from './AlphaSlider';
@@ -25,14 +34,14 @@ const POPUP_PADDING = 12;
const popupShellStyle: React.CSSProperties = {
width: POPUP_WIDTH,
padding: POPUP_PADDING,
- background: '#1f2428',
- border: '1px solid rgba(0, 0, 0, 0.6)',
+ background: BACKGROUND_HEX,
+ border: BORDER_BLACK_ALPHA_60,
borderRadius: 4,
- boxShadow: '0 4px 16px rgba(0, 0, 0, 0.5)',
+ boxShadow: COLOR_PICKER_POPUP_SHADOW,
display: 'flex',
flexDirection: 'column',
gap: 10,
- color: 'white',
+ color: WHITE,
fontSize: 12,
userSelect: 'none',
WebkitUserSelect: 'none',
@@ -51,7 +60,7 @@ const previewSwatchStyle: React.CSSProperties = {
flex: '0 0 auto',
borderRadius: 14,
overflow: 'hidden',
- border: '1px solid rgba(0, 0, 0, 0.6)',
+ border: BORDER_BLACK_ALPHA_60,
backgroundColor: CHECKER_BACKGROUND_COLOR,
backgroundImage: CHECKER_BACKGROUND_IMAGE,
backgroundSize: CHECKER_BACKGROUND_SIZE,
@@ -94,9 +103,9 @@ const labelStyle: React.CSSProperties = {
const baseInputStyle: React.CSSProperties = {
width: '100%',
background: INPUT_BACKGROUND,
- border: '1px solid rgba(0, 0, 0, 0.6)',
+ border: BORDER_BLACK_ALPHA_60,
borderRadius: 3,
- color: 'white',
+ color: WHITE,
padding: '4px 6px',
fontSize: 12,
textAlign: 'center',
@@ -104,8 +113,8 @@ const baseInputStyle: React.CSSProperties = {
};
const eyedropperButtonStyle: React.CSSProperties = {
- background: 'transparent',
- border: '1px solid rgba(0, 0, 0, 0.6)',
+ background: TRANSPARENT,
+ border: BORDER_BLACK_ALPHA_60,
borderRadius: 3,
padding: 0,
cursor: 'pointer',
@@ -427,7 +436,7 @@ export const ColorPickerPopup: React.FC<{
>
<EyedropperIcon
style={{width: 14, height: 14}}
- color="currentColor"
+ color={CURRENT_COLOR}
/>
</button>
) : null}
diff --git a/packages/studio/src/components/ColorPicker/HueSlider.tsx b/packages/studio/src/components/ColorPicker/HueSlider.tsx
index 0c80d451a1..dc0eb8f87c 100644
--- a/packages/studio/src/components/ColorPicker/HueSlider.tsx
+++ b/packages/studio/src/components/ColorPicker/HueSlider.tsx
@@ -1,5 +1,10 @@
import React, {useCallback, useMemo, useRef} from 'react';
import {clamp} from '../../helpers/color-conversion';
+import {
+ BORDER_WHITE_2PX,
+ COLOR_PICKER_HANDLE_SHADOW,
+ COLOR_PICKER_HUE_GRADIENT,
+} from '../../helpers/colors';
const SLIDER_HEIGHT = 12;
const HANDLE_WIDTH = 8;
@@ -10,8 +15,7 @@ const containerStyle: React.CSSProperties = {
width: '100%',
borderRadius: 3,
cursor: 'ew-resize',
- background:
- 'linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)',
+ background: COLOR_PICKER_HUE_GRADIENT,
touchAction: 'none',
};
@@ -75,8 +79,8 @@ export const HueSlider: React.FC<{
width: HANDLE_WIDTH,
height: SLIDER_HEIGHT + 4,
borderRadius: 2,
- border: '2px solid #fff',
- boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.6)',
+ border: BORDER_WHITE_2PX,
+ boxShadow: COLOR_PICKER_HANDLE_SHADOW,
pointerEvents: 'none',
};
}, [hue]);
diff --git a/packages/studio/src/components/ColorPicker/SaturationValueArea.tsx b/packages/studio/src/components/ColorPicker/SaturationValueArea.tsx
index 653e2b62ec..db1052fd32 100644
--- a/packages/studio/src/components/ColorPicker/SaturationValueArea.tsx
+++ b/packages/studio/src/components/ColorPicker/SaturationValueArea.tsx
@@ -1,5 +1,11 @@
import React, {useCallback, useMemo, useRef} from 'react';
import {clamp, hsvToRgb} from '../../helpers/color-conversion';
+import {
+ BORDER_WHITE_2PX,
+ COLOR_PICKER_HANDLE_SHADOW,
+ COLOR_PICKER_SATURATION_BLACK_GRADIENT,
+ COLOR_PICKER_SATURATION_VALUE_GRADIENT,
+} from '../../helpers/colors';
const AREA_HEIGHT = 140;
@@ -16,13 +22,13 @@ const containerStyle: React.CSSProperties = {
const valueOverlay: React.CSSProperties = {
position: 'absolute',
inset: 0,
- background: 'linear-gradient(to top, #000, transparent)',
+ background: COLOR_PICKER_SATURATION_BLACK_GRADIENT,
};
const saturationOverlay: React.CSSProperties = {
position: 'absolute',
inset: 0,
- background: 'linear-gradient(to right, #fff, transparent)',
+ background: COLOR_PICKER_SATURATION_VALUE_GRADIENT,
};
export const SaturationValueArea: React.FC<{
@@ -102,8 +108,8 @@ export const SaturationValueArea: React.FC<{
marginLeft: -6,
marginTop: -6,
borderRadius: '50%',
- border: '2px solid #fff',
- boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.6)',
+ border: BORDER_WHITE_2PX,
+ boxShadow: COLOR_PICKER_HANDLE_SHADOW,
pointerEvents: 'none',
};
}, [saturation, value]);
diff --git a/packages/studio/src/components/ColorPicker/checker.ts b/packages/studio/src/components/ColorPicker/checker.ts
index 25aaad0df6..283d7f78c9 100644
--- a/packages/studio/src/components/ColorPicker/checker.ts
+++ b/packages/studio/src/components/ColorPicker/checker.ts
@@ -1,8 +1,10 @@
-// Checkerboard background used to indicate transparency in color swatches
+import {
+ COLOR_PICKER_CHECKER_BACKGROUND_COLOR,
+ COLOR_PICKER_CHECKER_BACKGROUND_IMAGE,
+} from '../../helpers/colors'; // Checkerboard background used to indicate transparency in color swatches
// and the alpha slider. Rendered as a CSS gradient so we don't need an asset.
-export const CHECKER_BACKGROUND_IMAGE =
- 'linear-gradient(45deg, #888 25%, transparent 25%), linear-gradient(-45deg, #888 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #888 75%), linear-gradient(-45deg, transparent 75%, #888 75%)';
+export const CHECKER_BACKGROUND_IMAGE = COLOR_PICKER_CHECKER_BACKGROUND_IMAGE;
export const CHECKER_BACKGROUND_SIZE = '8px 8px';
export const CHECKER_BACKGROUND_POSITION = '0 0, 0 4px, 4px -4px, -4px 0';
-export const CHECKER_BACKGROUND_COLOR = '#444';
+export const CHECKER_BACKGROUND_COLOR = COLOR_PICKER_CHECKER_BACKGROUND_COLOR;
diff --git a/packages/studio/src/components/CompactExplanation.tsx b/packages/studio/src/components/CompactExplanation.tsx
index 6d8e858895..76f26f01b6 100644
--- a/packages/studio/src/components/CompactExplanation.tsx
+++ b/packages/studio/src/components/CompactExplanation.tsx
@@ -1,5 +1,5 @@
import {useState, type CSSProperties, type ReactNode} from 'react';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {CURRENT_COLOR, LIGHT_TEXT, WHITE} from '../helpers/colors';
const compactExplanation: CSSProperties = {
color: LIGHT_TEXT,
@@ -25,13 +25,13 @@ const compactHelpLink: CSSProperties = {
const compactHelpLinkHovered: CSSProperties = {
...compactHelpLink,
- color: 'white',
+ color: WHITE,
};
const compactHelpIcon: CSSProperties = {
color: 'inherit',
display: 'block',
- fill: 'currentColor',
+ fill: CURRENT_COLOR,
height: 13,
width: 13,
};
@@ -70,7 +70,7 @@ const CompactHelpLink = ({
>
<path
style={compactHelpIconPath}
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zm256-80c-17.7 0-32 14.3-32 32l-48 0c0-44.2 35.8-80 80-80s80 35.8 80 80c0 35.1-20.5 57.5-38.2 70-6.3 4.4-12.5 7.8-17.8 10.4l0 21.9-48 0 0-56.7c1.4-.4 2.7-.7 4.1-1.1 12.2-3.2 23.3-6.1 34.1-13.7 10.4-7.3 17.8-16.9 17.8-30.8 0-17.7-14.3-32-32-32zM232 344l48 0 0 48-48 0 0-48z"
/>
</svg>
diff --git a/packages/studio/src/components/CompositionSelector.tsx b/packages/studio/src/components/CompositionSelector.tsx
index 1797d1b75b..f60df4cfa7 100644
--- a/packages/studio/src/components/CompositionSelector.tsx
+++ b/packages/studio/src/components/CompositionSelector.tsx
@@ -1,7 +1,12 @@
import React, {useCallback, useContext, useMemo} from 'react';
import {Internals} from 'remotion';
import {cmdOrCtrlCharacter} from '../error-overlay/remotion-overlay/ShortcutHint';
-import {BACKGROUND, BORDER_COLOR, LIGHT_TEXT} from '../helpers/colors';
+import {
+ BACKGROUND,
+ BLACK_HEX,
+ LIGHT_TEXT,
+ WHITE_ALPHA_06,
+} from '../helpers/colors';
import {createFolderTree} from '../helpers/create-folder-tree';
import {ExpandedFoldersContext} from '../helpers/persist-open-folders';
import {sortItemsByNonceHistory} from '../helpers/sort-by-nonce-history';
@@ -79,11 +84,11 @@ const container: React.CSSProperties = {
const quickSwitcherArea: React.CSSProperties = {
padding: '4px 12px',
- borderBottom: `1px solid ${BORDER_COLOR}`,
+ borderBottom: `1px solid ${BLACK_HEX}`,
};
const quickSwitcherTrigger: React.CSSProperties = {
- backgroundColor: 'rgba(255, 255, 255, 0.06)',
+ backgroundColor: WHITE_ALPHA_06,
borderRadius: 5,
padding: '4px 10px',
color: LIGHT_TEXT,
diff --git a/packages/studio/src/components/CompositionSelectorItem.tsx b/packages/studio/src/components/CompositionSelectorItem.tsx
index 03b364ade4..3c575c43cb 100644
--- a/packages/studio/src/components/CompositionSelectorItem.tsx
+++ b/packages/studio/src/components/CompositionSelectorItem.tsx
@@ -12,6 +12,7 @@ import {StudioServerConnectionCtx} from '../helpers/client-id';
import {
BACKGROUND,
LIGHT_TEXT,
+ WHITE,
getBackgroundFromHoverState,
} from '../helpers/colors';
import {isCompositionStill} from '../helpers/is-composition-still';
@@ -149,7 +150,7 @@ export const CompositionSelectorItem: React.FC<{
const label = useMemo(() => {
return {
...labelStyle,
- color: selected || hovered ? 'white' : LIGHT_TEXT,
+ color: selected || hovered ? WHITE : LIGHT_TEXT,
};
}, [hovered, selected]);
@@ -222,11 +223,11 @@ export const CompositionSelectorItem: React.FC<{
{item.expanded ? (
<ExpandedFolderIcon
style={iconStyle}
- color={hovered || selected ? 'white' : LIGHT_TEXT}
+ color={hovered || selected ? WHITE : LIGHT_TEXT}
/>
) : (
<CollapsedFolderIcon
- color={hovered || selected ? 'white' : LIGHT_TEXT}
+ color={hovered || selected ? WHITE : LIGHT_TEXT}
style={iconStyle}
/>
)}
@@ -277,12 +278,12 @@ export const CompositionSelectorItem: React.FC<{
>
{isCompositionStill(item.composition) ? (
<StillIcon
- color={hovered || selected ? 'white' : LIGHT_TEXT}
+ color={hovered || selected ? WHITE : LIGHT_TEXT}
style={iconStyle}
/>
) : (
<FilmIcon
- color={hovered || selected ? 'white' : LIGHT_TEXT}
+ color={hovered || selected ? WHITE : LIGHT_TEXT}
style={iconStyle}
/>
)}
diff --git a/packages/studio/src/components/CopyButton.tsx b/packages/studio/src/components/CopyButton.tsx
index fe3b36e335..2feb0eeaca 100644
--- a/packages/studio/src/components/CopyButton.tsx
+++ b/packages/studio/src/components/CopyButton.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useEffect, useState} from 'react';
+import {CURRENT_COLOR, WHITE} from '../helpers/colors';
import {copyText} from '../helpers/copy-text';
import {Button} from './Button';
import {Spacing} from './layout';
@@ -7,7 +8,7 @@ import {showNotification} from './Notifications/NotificationCenter';
const iconStyle: React.CSSProperties = {
width: 16,
height: 16,
- color: 'white',
+ color: WHITE,
};
const buttonContainerStyle: React.CSSProperties = {
@@ -28,7 +29,7 @@ const copyIcon = (
style={iconStyle}
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z"
/>
</svg>
diff --git a/packages/studio/src/components/EffectPickerModal.tsx b/packages/studio/src/components/EffectPickerModal.tsx
index 0b23136fa5..ed21fa69b2 100644
--- a/packages/studio/src/components/EffectPickerModal.tsx
+++ b/packages/studio/src/components/EffectPickerModal.tsx
@@ -11,7 +11,11 @@ import React, {
useRef,
useState,
} from 'react';
-import {LIGHT_TEXT, getBackgroundFromHoverState} from '../helpers/colors';
+import {
+ LIGHT_TEXT,
+ WHITE,
+ getBackgroundFromHoverState,
+} from '../helpers/colors';
import {useKeybinding} from '../helpers/use-keybinding';
import {ModalsContext, type AddEffectModalState} from '../state/modals';
import {ContextMenu} from './ContextMenu';
@@ -98,7 +102,7 @@ const EffectPickerResult: React.FC<{
const labelStyle = useMemo((): React.CSSProperties => {
return {
...label,
- color: selected || hovered ? 'white' : LIGHT_TEXT,
+ color: selected || hovered ? WHITE : LIGHT_TEXT,
};
}, [hovered, selected]);
diff --git a/packages/studio/src/components/FilePreview.tsx b/packages/studio/src/components/FilePreview.tsx
index de8bb17a0d..3e715b4012 100644
--- a/packages/studio/src/components/FilePreview.tsx
+++ b/packages/studio/src/components/FilePreview.tsx
@@ -1,5 +1,6 @@
import {formatBytes} from '@remotion/studio-shared';
import React from 'react';
+import {WHITE} from '../helpers/colors';
import type {AssetMetadata} from '../helpers/get-asset-metadata';
import type {AssetFileType} from '../helpers/get-preview-file-type';
import {JSONViewer} from './JSONViewer';
@@ -8,7 +9,7 @@ import {TextViewer} from './TextViewer';
const msgStyle: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
fontFamily: 'sans-serif',
display: 'flex',
justifyContent: 'center',
diff --git a/packages/studio/src/components/FpsCounter.tsx b/packages/studio/src/components/FpsCounter.tsx
index 20c637c904..079e299afa 100644
--- a/packages/studio/src/components/FpsCounter.tsx
+++ b/packages/studio/src/components/FpsCounter.tsx
@@ -6,9 +6,10 @@ import React, {
useState,
} from 'react';
import {Internals} from 'remotion';
+import {RED, WHITE} from '../helpers/colors';
const label: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
fontSize: 15,
fontFamily: 'Arial, Helvetica, sans-serif',
whiteSpace: 'nowrap',
@@ -83,7 +84,7 @@ export const FpsCounter: React.FC<{
return {
...label,
- color: fps < expectedFps * 0.9 ? 'red' : 'white',
+ color: fps < expectedFps * 0.9 ? RED : WHITE,
};
}, [fps, playbackSpeed, videoConfig]);
diff --git a/packages/studio/src/components/FullscreenToggle.tsx b/packages/studio/src/components/FullscreenToggle.tsx
index e8cc843f5b..e30e44d909 100644
--- a/packages/studio/src/components/FullscreenToggle.tsx
+++ b/packages/studio/src/components/FullscreenToggle.tsx
@@ -1,6 +1,7 @@
import {useCallback, useContext, useEffect} from 'react';
import {Internals} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
+import {WHITE_HEX} from '../helpers/colors';
import {
areKeyboardShortcutsDisabled,
useKeybinding,
@@ -53,7 +54,11 @@ export const FullScreenToggle: React.FC<{}> = () => {
aria-label={accessibilityLabel}
onClick={onClick}
>
- <svg style={{width: 18, height: 18}} viewBox="0 0 448 512" fill="#fff">
+ <svg
+ style={{width: 18, height: 18}}
+ viewBox="0 0 448 512"
+ fill={WHITE_HEX}
+ >
<path d="M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" />
</svg>
</ControlButton>
diff --git a/packages/studio/src/components/InlineAction.tsx b/packages/studio/src/components/InlineAction.tsx
index 4206afce76..97d3cc37d3 100644
--- a/packages/studio/src/components/InlineAction.tsx
+++ b/packages/studio/src/components/InlineAction.tsx
@@ -1,5 +1,10 @@
import React, {useCallback, useMemo, useState} from 'react';
-import {LIGHT_TEXT, getBackgroundFromHoverState} from '../helpers/colors';
+import {
+ LIGHT_TEXT,
+ TRANSPARENT,
+ WHITE,
+ getBackgroundFromHoverState,
+} from '../helpers/colors';
import {useZIndex} from '../state/z-index';
export type RenderInlineAction = (color: string) => React.ReactNode;
@@ -33,7 +38,7 @@ export const InlineAction = ({
return {
border: 'none',
background: disabled
- ? 'transparent'
+ ? TRANSPARENT
: getBackgroundFromHoverState({hovered, selected: false}),
height: 24,
width: 24,
@@ -56,7 +61,7 @@ export const InlineAction = ({
tabIndex={tabIndex}
title={title}
>
- {renderAction(hovered ? 'white' : LIGHT_TEXT)}
+ {renderAction(hovered ? WHITE : LIGHT_TEXT)}
</button>
);
};
diff --git a/packages/studio/src/components/InlineEditableTitle.tsx b/packages/studio/src/components/InlineEditableTitle.tsx
index a05922be34..d4cfe7ec80 100644
--- a/packages/studio/src/components/InlineEditableTitle.tsx
+++ b/packages/studio/src/components/InlineEditableTitle.tsx
@@ -5,11 +5,16 @@ import type {
KeyboardEventHandler,
} from 'react';
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
-import {CLEAR_HOVER, INPUT_BACKGROUND} from '../helpers/colors';
+import {
+ WHITE_ALPHA_06,
+ INPUT_BACKGROUND,
+ TRANSPARENT,
+ WHITE,
+} from '../helpers/colors';
const titleWrapper: React.CSSProperties = {
boxSizing: 'border-box',
- color: 'white',
+ color: WHITE,
fontSize: 12,
height: 18,
lineHeight: '18px',
@@ -43,10 +48,10 @@ const titleGridItem: React.CSSProperties = {
const titleInput: React.CSSProperties = {
appearance: 'none',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
border: 'none',
boxShadow: 'none',
- color: 'white',
+ color: WHITE,
fontFamily: 'inherit',
fontSize: 12,
height: 18,
@@ -142,8 +147,8 @@ export const InlineEditableTitle: React.FC<{
const backgroundColor = isEditing
? INPUT_BACKGROUND
: isHovered && canRename
- ? CLEAR_HOVER
- : 'transparent';
+ ? WHITE_ALPHA_06
+ : TRANSPARENT;
const innerStyle = useMemo((): React.CSSProperties => {
return {
diff --git a/packages/studio/src/components/InspectorInfoHeader.tsx b/packages/studio/src/components/InspectorInfoHeader.tsx
index dc5ff09e0d..a14713dc2e 100644
--- a/packages/studio/src/components/InspectorInfoHeader.tsx
+++ b/packages/studio/src/components/InspectorInfoHeader.tsx
@@ -1,12 +1,12 @@
import React from 'react';
-import {BACKGROUND, LIGHT_TEXT} from '../helpers/colors';
+import {BACKGROUND, LIGHT_TEXT, WHITE} from '../helpers/colors';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from './InspectorPanelLayout';
export const INSPECTOR_INFO_HEADER_MIN_HEIGHT = 84;
const container: React.CSSProperties = {
backgroundColor: BACKGROUND,
- color: 'white',
+ color: WHITE,
display: 'block',
minHeight: INSPECTOR_INFO_HEADER_MIN_HEIGHT,
padding: `6px ${INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
@@ -27,7 +27,7 @@ const content: React.CSSProperties = {
const title: React.CSSProperties = {
backgroundColor: BACKGROUND,
- color: 'white',
+ color: WHITE,
fontSize: 12,
lineHeight: '18px',
overflow: 'hidden',
diff --git a/packages/studio/src/components/InspectorPanel/KeyframeEasingNavigator.tsx b/packages/studio/src/components/InspectorPanel/KeyframeEasingNavigator.tsx
index e905282a47..0427b5e199 100644
--- a/packages/studio/src/components/InspectorPanel/KeyframeEasingNavigator.tsx
+++ b/packages/studio/src/components/InspectorPanel/KeyframeEasingNavigator.tsx
@@ -1,6 +1,6 @@
import React, {useCallback, useMemo} from 'react';
import {Internals, useVideoConfig} from 'remotion';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE_ALPHA_25} from '../../helpers/colors';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {InlineAction} from '../InlineAction';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
@@ -85,7 +85,7 @@ const chevronIcon: React.CSSProperties = {
width: 8,
};
-const disabledChevronColor = 'rgba(255, 255, 255, 0.25)';
+const disabledChevronColor = WHITE_ALPHA_25;
const NavigationChevron: React.FC<{
readonly color: string;
diff --git a/packages/studio/src/components/InspectorPanel/common.tsx b/packages/studio/src/components/InspectorPanel/common.tsx
index 588f4035f3..b5ad663ec0 100644
--- a/packages/studio/src/components/InspectorPanel/common.tsx
+++ b/packages/studio/src/components/InspectorPanel/common.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, TRANSPARENT, WHITE} from '../../helpers/colors';
import {InlineAction} from '../InlineAction';
import {ValidationMessage} from '../NewComposition/ValidationMessage';
import type {RenderModalWarning} from '../RenderModal/DataEditor';
@@ -88,7 +88,7 @@ export const InspectorDetailRow: React.FC<{
const inlineLabelButton: React.CSSProperties = {
alignItems: 'center',
appearance: 'none',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
border: 'none',
color: LIGHT_TEXT,
cursor: 'default',
@@ -129,7 +129,7 @@ export const InspectorInlineAction: React.FC<{
readonly renderIcon: (color: string) => React.ReactNode;
}> = ({children, disabled, onClick, renderIcon}) => {
const [hovered, setHovered] = React.useState(false);
- const color = hovered && !disabled ? 'white' : LIGHT_TEXT;
+ const color = hovered && !disabled ? WHITE : LIGHT_TEXT;
const buttonStyle = React.useMemo(
(): React.CSSProperties => ({
...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
diff --git a/packages/studio/src/components/InspectorPanel/styles.ts b/packages/studio/src/components/InspectorPanel/styles.ts
index b959cbcb48..eeaae8919e 100644
--- a/packages/studio/src/components/InspectorPanel/styles.ts
+++ b/packages/studio/src/components/InspectorPanel/styles.ts
@@ -1,10 +1,16 @@
import type React from 'react';
-import {BACKGROUND, BLUE, LIGHT_TEXT, LINE_COLOR} from '../../helpers/colors';
+import {
+ BACKGROUND,
+ BLUE,
+ LIGHT_TEXT,
+ LINE_COLOR,
+ WHITE,
+} from '../../helpers/colors';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
export const container: React.CSSProperties = {
backgroundColor: BACKGROUND,
- color: 'white',
+ color: WHITE,
display: 'flex',
flex: 1,
flexDirection: 'column',
@@ -63,7 +69,7 @@ export const sequenceHeaderTitle: React.CSSProperties = {
alignSelf: 'stretch',
backgroundColor: BACKGROUND,
border: 'none',
- color: 'white',
+ color: WHITE,
display: 'flex',
fontFamily: 'sans-serif',
fontSize: 12,
@@ -193,7 +199,7 @@ export const detailLabel: React.CSSProperties = {
};
export const detailValue: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
fontSize: 13,
fontVariantNumeric: 'tabular-nums',
minWidth: 0,
diff --git a/packages/studio/src/components/InspectorSequenceSection.tsx b/packages/studio/src/components/InspectorSequenceSection.tsx
index cf2b1e35c1..8395474787 100644
--- a/packages/studio/src/components/InspectorSequenceSection.tsx
+++ b/packages/studio/src/components/InspectorSequenceSection.tsx
@@ -2,7 +2,7 @@ import React, {useCallback, useContext, useMemo, useState} from 'react';
import type {TSequence} from 'remotion';
import type {CodePosition} from '../error-overlay/react-overlay/utils/get-source-map';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../helpers/colors';
import type {SequenceNodePathInfo} from '../helpers/get-timeline-sequence-sort-key';
import {
SCHEMA_FIELD_GROUPS,
@@ -28,7 +28,7 @@ import {
import {useTimelineExpandedTree} from './Timeline/use-timeline-expanded-tree';
const container: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
display: 'flex',
flexDirection: 'column',
fontFamily: 'Arial, Helvetica, sans-serif',
diff --git a/packages/studio/src/components/InstallablePackage.tsx b/packages/studio/src/components/InstallablePackage.tsx
index 88c883ff50..2bbe8d67f3 100644
--- a/packages/studio/src/components/InstallablePackage.tsx
+++ b/packages/studio/src/components/InstallablePackage.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {LIGHT_TEXT, TEXT_COLOR} from '../helpers/colors';
+import {LIGHT_TEXT, WHITE_HEX} from '../helpers/colors';
const FONT_SIZE = 13;
@@ -22,7 +22,7 @@ export const InstallablePackageComp: React.FC<{
href={link}
style={{
fontSize: FONT_SIZE,
- color: TEXT_COLOR,
+ color: WHITE_HEX,
textDecoration: 'none',
}}
target="_blank"
diff --git a/packages/studio/src/components/KeyboardShortcutsExplainer.tsx b/packages/studio/src/components/KeyboardShortcutsExplainer.tsx
index 17b573a583..f50895ed5a 100644
--- a/packages/studio/src/components/KeyboardShortcutsExplainer.tsx
+++ b/packages/studio/src/components/KeyboardShortcutsExplainer.tsx
@@ -2,7 +2,10 @@ import React from 'react';
import {cmdOrCtrlCharacter} from '../error-overlay/remotion-overlay/ShortcutHint';
import {
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
+ BLACK_ALPHA_60,
+ KEYBOARD_SHORTCUT_KEY_COLOR,
+ WHITE,
+ WHITE_ALPHA_10,
} from '../helpers/colors';
import {areKeyboardShortcutsDisabled} from '../helpers/use-keybinding';
import {ArrowLeft, ArrowRight, ShiftIcon} from '../icons/keys';
@@ -17,9 +20,9 @@ const left: React.CSSProperties = {
const key: React.CSSProperties = {
background: INPUT_BACKGROUND,
padding: '3px 6px',
- color: 'white',
+ color: WHITE,
borderRadius: 3,
- border: '1px solid ' + INPUT_BORDER_COLOR_UNHOVERED,
+ border: '1px solid ' + BLACK_ALPHA_60,
borderBottomWidth: 3,
fontSize: 14,
fontFamily: 'monospace',
@@ -27,7 +30,7 @@ const key: React.CSSProperties = {
const right: React.CSSProperties = {
fontSize: 14,
- color: '#eee',
+ color: KEYBOARD_SHORTCUT_KEY_COLOR,
};
const container: React.CSSProperties = {
@@ -39,7 +42,7 @@ const container: React.CSSProperties = {
const title: React.CSSProperties = {
fontWeight: 'bold',
- color: 'white',
+ color: WHITE,
fontSize: 14,
marginBottom: 10,
};
@@ -48,7 +51,7 @@ const keyboardShortcutsDisabled: React.CSSProperties = {
padding: 12,
width: '100%',
fontSize: 14,
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
+ backgroundColor: WHITE_ALPHA_10,
};
const ul: React.CSSProperties = {
diff --git a/packages/studio/src/components/LoopToggle.tsx b/packages/studio/src/components/LoopToggle.tsx
index 9fc5235b08..fce9d8de7c 100644
--- a/packages/studio/src/components/LoopToggle.tsx
+++ b/packages/studio/src/components/LoopToggle.tsx
@@ -1,5 +1,5 @@
import React, {useCallback} from 'react';
-import {BLUE} from '../helpers/colors';
+import {BLUE, WHITE} from '../helpers/colors';
import {persistLoopOption} from '../state/loop';
import {ControlButton} from './ControlButton';
@@ -24,7 +24,7 @@ export const LoopToggle: React.FC<{
>
<svg viewBox="0 0 512 512" style={{width: 18, height: 18}}>
<path
- fill={loop ? BLUE : 'white'}
+ fill={loop ? BLUE : WHITE}
d="M493.544 181.463c11.956 22.605 18.655 48.4 18.452 75.75C511.339 345.365 438.56 416 350.404 416H192v47.495c0 22.475-26.177 32.268-40.971 17.475l-80-80c-9.372-9.373-9.372-24.569 0-33.941l80-80C166.138 271.92 192 282.686 192 304v48h158.875c52.812 0 96.575-42.182 97.12-94.992.155-15.045-3.17-29.312-9.218-42.046-4.362-9.185-2.421-20.124 4.8-27.284 4.745-4.706 8.641-8.555 11.876-11.786 11.368-11.352 30.579-8.631 38.091 5.571zM64.005 254.992c.545-52.81 44.308-94.992 97.12-94.992H320v47.505c0 22.374 26.121 32.312 40.971 17.465l80-80c9.372-9.373 9.372-24.569 0-33.941l-80-80C346.014 16.077 320 26.256 320 48.545V96H161.596C73.44 96 .661 166.635.005 254.788c-.204 27.35 6.495 53.145 18.452 75.75 7.512 14.202 26.723 16.923 38.091 5.57 3.235-3.231 7.13-7.08 11.876-11.786 7.22-7.16 9.162-18.098 4.8-27.284-6.049-12.735-9.374-27.001-9.219-42.046z"
/>
</svg>
diff --git a/packages/studio/src/components/Menu/MenuDivider.tsx b/packages/studio/src/components/Menu/MenuDivider.tsx
index 4d71ef405c..17df320944 100644
--- a/packages/studio/src/components/Menu/MenuDivider.tsx
+++ b/packages/studio/src/components/Menu/MenuDivider.tsx
@@ -1,11 +1,11 @@
import React from 'react';
-import {INPUT_BORDER_COLOR_HOVERED} from '../../helpers/colors';
+import {WHITE_ALPHA_05} from '../../helpers/colors';
const menuDivider: React.CSSProperties = {
marginTop: 4,
marginBottom: 4,
height: 1,
- backgroundColor: INPUT_BORDER_COLOR_HOVERED,
+ backgroundColor: WHITE_ALPHA_05,
};
export const MenuDivider: React.FC = () => {
diff --git a/packages/studio/src/components/Menu/MenuItem.tsx b/packages/studio/src/components/Menu/MenuItem.tsx
index b8436538b1..c79d4f40ad 100644
--- a/packages/studio/src/components/Menu/MenuItem.tsx
+++ b/packages/studio/src/components/Menu/MenuItem.tsx
@@ -2,7 +2,7 @@ import {PlayerInternals} from '@remotion/player';
import type {SetStateAction} from 'react';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import ReactDOM from 'react-dom';
-import {getBackgroundFromHoverState} from '../../helpers/colors';
+import {WHITE, getBackgroundFromHoverState} from '../../helpers/colors';
import {HigherZIndex, useZIndex} from '../../state/z-index';
import type {ComboboxValue} from '../NewComposition/ComboBox';
import {MenuContent} from '../NewComposition/MenuContent';
@@ -12,7 +12,7 @@ import {menuContainerTowardsBottom, outerPortal} from './styles';
const container: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
paddingLeft: 10,
paddingRight: 10,
cursor: 'default',
diff --git a/packages/studio/src/components/Menu/MenuSubItem.tsx b/packages/studio/src/components/Menu/MenuSubItem.tsx
index 43cbccadfc..d482adaa98 100644
--- a/packages/studio/src/components/Menu/MenuSubItem.tsx
+++ b/packages/studio/src/components/Menu/MenuSubItem.tsx
@@ -2,7 +2,7 @@ import {PlayerInternals} from '@remotion/player';
import type {PointerEvent} from 'react';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import ReactDOM from 'react-dom';
-import {CLEAR_HOVER, LIGHT_TEXT} from '../../helpers/colors';
+import {WHITE_ALPHA_06, LIGHT_TEXT, TRANSPARENT} from '../../helpers/colors';
import {useMobileLayout} from '../../helpers/mobile-layout';
import {areKeyboardShortcutsDisabled} from '../../helpers/use-keybinding';
import {CaretRight} from '../../icons/caret';
@@ -97,7 +97,7 @@ export const MenuSubItem: React.FC<{
const style = useMemo((): React.CSSProperties => {
return {
...container,
- backgroundColor: selected && !disabled ? CLEAR_HOVER : 'transparent',
+ backgroundColor: selected && !disabled ? WHITE_ALPHA_06 : TRANSPARENT,
opacity: disabled ? 0.5 : 1,
cursor: disabled ? 'not-allowed' : 'default',
};
diff --git a/packages/studio/src/components/Menu/styles.ts b/packages/studio/src/components/Menu/styles.ts
index faa0564ecb..de55fcc408 100644
--- a/packages/studio/src/components/Menu/styles.ts
+++ b/packages/studio/src/components/Menu/styles.ts
@@ -1,5 +1,11 @@
import type React from 'react';
-import {BACKGROUND, BLUE} from '../../helpers/colors';
+import {
+ BACKGROUND,
+ BLUE,
+ SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM,
+ SHADOW_BLACK_ALPHA_50_TOWARDS_TOP,
+ WHITE,
+} from '../../helpers/colors';
export const MENU_VERTICAL_PADDING = 4;
export const SUBMENU_LEFT_INSET = -8;
@@ -10,13 +16,13 @@ export const MAX_MOBILE_MENU_WIDTH = 300;
const menuContainer: React.CSSProperties = {
backgroundColor: BACKGROUND,
position: 'fixed',
- color: 'white',
+ color: WHITE,
userSelect: 'none',
WebkitUserSelect: 'none',
};
-export const SHADOW_TOWARDS_BOTTOM = '0 2px 8px rgba(0, 0, 0, 0.5)';
-export const SHADOW_TOWARDS_TOP = '0 -2px 8px rgba(0, 0, 0, 0.5)';
+export const SHADOW_TOWARDS_BOTTOM = SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM;
+export const SHADOW_TOWARDS_TOP = SHADOW_BLACK_ALPHA_50_TOWARDS_TOP;
export const menuContainerTowardsBottom: React.CSSProperties = {
...menuContainer,
diff --git a/packages/studio/src/components/MenuToolbar.tsx b/packages/studio/src/components/MenuToolbar.tsx
index bebc878200..3767b04553 100644
--- a/packages/studio/src/components/MenuToolbar.tsx
+++ b/packages/studio/src/components/MenuToolbar.tsx
@@ -1,6 +1,6 @@
import type {SetStateAction} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
-import {BACKGROUND} from '../helpers/colors';
+import {BACKGROUND, BORDER_BLACK, WHITE} from '../helpers/colors';
import {useMobileLayout} from '../helpers/mobile-layout';
import {useMenuStructure} from '../helpers/use-menu-structure';
import {Row, Spacing} from './layout';
@@ -17,8 +17,8 @@ const row: React.CSSProperties = {
alignItems: 'center',
flexDirection: 'row',
display: 'flex',
- color: 'white',
- borderBottom: '1px solid black',
+ color: WHITE,
+ borderBottom: BORDER_BLACK,
boxSizing: 'border-box',
fontSize: 13,
height: MENU_TOOLBAR_HEIGHT,
diff --git a/packages/studio/src/components/ModalButton.tsx b/packages/studio/src/components/ModalButton.tsx
index 27f325ffbd..13ede2733e 100644
--- a/packages/studio/src/components/ModalButton.tsx
+++ b/packages/studio/src/components/ModalButton.tsx
@@ -1,11 +1,11 @@
import React, {useMemo} from 'react';
-import {BLUE, BLUE_DISABLED} from '../helpers/colors';
+import {BLUE, BLUE_DISABLED, WHITE} from '../helpers/colors';
import type {ButtonProps} from './Button';
import {Button} from './Button';
const buttonStyle: React.CSSProperties = {
backgroundColor: BLUE,
- color: 'white',
+ color: WHITE,
};
export const ModalButton: React.FC<Omit<ButtonProps, 'style'>> = (props) => {
diff --git a/packages/studio/src/components/ModalContainer.tsx b/packages/studio/src/components/ModalContainer.tsx
index e57b128d34..ae9ed88939 100644
--- a/packages/studio/src/components/ModalContainer.tsx
+++ b/packages/studio/src/components/ModalContainer.tsx
@@ -1,5 +1,10 @@
import React, {useCallback} from 'react';
-import {BACKGROUND} from '../helpers/colors';
+import {
+ BACKGROUND,
+ SHADOW_BLACK,
+ WHITE,
+ WHITE_ALPHA_20,
+} from '../helpers/colors';
import {HigherZIndex} from '../state/z-index';
const padding = 20;
@@ -17,7 +22,7 @@ export const getMaxModalHeight = (height: number) => {
};
const backgroundOverlay: React.CSSProperties = {
- backgroundColor: 'rgba(255, 255, 255, 0.2)',
+ backgroundColor: WHITE_ALPHA_20,
backdropFilter: `blur(1px)`,
position: 'fixed',
height: '100%',
@@ -28,8 +33,8 @@ const backgroundOverlay: React.CSSProperties = {
const panel: React.CSSProperties = {
backgroundColor: BACKGROUND,
- boxShadow: '0 0 4px black',
- color: 'white',
+ boxShadow: SHADOW_BLACK,
+ color: WHITE,
margin: 'auto',
};
diff --git a/packages/studio/src/components/ModalFooter.tsx b/packages/studio/src/components/ModalFooter.tsx
index d85399c389..28245f59f4 100644
--- a/packages/studio/src/components/ModalFooter.tsx
+++ b/packages/studio/src/components/ModalFooter.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {BORDER_BLACK} from '../helpers/colors';
const content: React.CSSProperties = {
padding: 12,
@@ -11,7 +12,5 @@ const content: React.CSSProperties = {
export const ModalFooterContainer: React.FC<{
readonly children: React.ReactNode;
}> = ({children}) => {
- return (
- <div style={{...content, borderTop: '1px solid black'}}>{children}</div>
- );
+ return <div style={{...content, borderTop: BORDER_BLACK}}>{children}</div>;
};
diff --git a/packages/studio/src/components/ModalHeader.tsx b/packages/studio/src/components/ModalHeader.tsx
index c3cdd830fe..f7d6fe5fe4 100644
--- a/packages/studio/src/components/ModalHeader.tsx
+++ b/packages/studio/src/components/ModalHeader.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useContext} from 'react';
+import {BORDER_BLACK, WHITE} from '../helpers/colors';
import {ModalsContext} from '../state/modals';
import {Flex} from './layout';
import {CancelButton} from './NewComposition/CancelButton';
@@ -9,12 +10,12 @@ const container: React.CSSProperties = {
alignItems: 'center',
padding: '12px 16px',
width: '100%',
- borderBottom: '1px solid black',
+ borderBottom: BORDER_BLACK,
};
const titleStyle: React.CSSProperties = {
fontSize: 14,
- color: 'white',
+ color: WHITE,
};
const icon: React.CSSProperties = {
diff --git a/packages/studio/src/components/NewComposition/CancelButton.tsx b/packages/studio/src/components/NewComposition/CancelButton.tsx
index 291a093a2c..ea03ff0c52 100644
--- a/packages/studio/src/components/NewComposition/CancelButton.tsx
+++ b/packages/studio/src/components/NewComposition/CancelButton.tsx
@@ -1,12 +1,13 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR, TRANSPARENT, WHITE} from '../../helpers/colors';
import {useZIndex} from '../../state/z-index';
const style: React.CSSProperties = {
appearance: 'none',
border: 'none',
- backgroundColor: 'transparent',
- color: 'white',
+ backgroundColor: TRANSPARENT,
+ color: WHITE,
cursor: 'pointer',
display: 'inline-flex',
justifyContent: 'center',
@@ -23,7 +24,7 @@ export const CancelButton: React.FC<
<button tabIndex={tabIndex} style={style} type="button" onClick={onPress}>
<svg viewBox="0 0 320 512" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"
/>
</svg>
diff --git a/packages/studio/src/components/NewComposition/ComboBox.tsx b/packages/studio/src/components/NewComposition/ComboBox.tsx
index e560e0c5c1..213df5e6d2 100644
--- a/packages/studio/src/components/NewComposition/ComboBox.tsx
+++ b/packages/studio/src/components/NewComposition/ComboBox.tsx
@@ -3,9 +3,10 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import ReactDOM from 'react-dom';
import {
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_HOVERED,
- INPUT_BORDER_COLOR_UNHOVERED,
+ WHITE_ALPHA_05,
+ BLACK_ALPHA_60,
SELECTED_BACKGROUND,
+ WHITE,
} from '../../helpers/colors';
import {useMobileLayout} from '../../helpers/mobile-layout';
import {noop} from '../../helpers/noop';
@@ -243,15 +244,15 @@ export const Combobox: React.FC<{
...(customStyle ?? {}),
userSelect: 'none',
WebkitUserSelect: 'none',
- color: 'white',
+ color: WHITE,
display: 'inline-flex',
flexDirection: 'row',
alignItems: 'center',
borderColor: opened
? SELECTED_BACKGROUND
: hovered
- ? INPUT_BORDER_COLOR_HOVERED
- : INPUT_BORDER_COLOR_UNHOVERED,
+ ? WHITE_ALPHA_05
+ : BLACK_ALPHA_60,
};
}, [customStyle, hovered, opened, small]);
diff --git a/packages/studio/src/components/NewComposition/InputDragger.tsx b/packages/studio/src/components/NewComposition/InputDragger.tsx
index f25767dd52..4aee845b06 100644
--- a/packages/studio/src/components/NewComposition/InputDragger.tsx
+++ b/packages/studio/src/components/NewComposition/InputDragger.tsx
@@ -5,7 +5,7 @@ import type {
} from 'react';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {interpolate} from 'remotion';
-import {BLUE} from '../../helpers/colors';
+import {BLUE, TRANSPARENT} from '../../helpers/colors';
import {noop} from '../../helpers/noop';
import {getClickLock, setClickLock} from '../../state/input-dragger-click-lock';
import {HigherZIndex} from '../../state/z-index';
@@ -111,8 +111,8 @@ const InputDraggerForwardRefFn: React.ForwardRefRenderFunction<
const style = useMemo(() => {
return {
...inputBaseStyle,
- backgroundColor: 'transparent',
- borderColor: 'transparent',
+ backgroundColor: TRANSPARENT,
+ borderColor: TRANSPARENT,
padding: '4px 6px',
...{outline: 'none'},
};
diff --git a/packages/studio/src/components/NewComposition/MenuContent.tsx b/packages/studio/src/components/NewComposition/MenuContent.tsx
index bd1ca0d1b7..afd18a4fbd 100644
--- a/packages/studio/src/components/NewComposition/MenuContent.tsx
+++ b/packages/studio/src/components/NewComposition/MenuContent.tsx
@@ -1,6 +1,6 @@
import type {PointerEvent, SetStateAction} from 'react';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
-import {INPUT_BORDER_COLOR_UNHOVERED} from '../../helpers/colors';
+import {BLACK_ALPHA_60} from '../../helpers/colors';
import {useMobileLayout} from '../../helpers/mobile-layout';
import {useKeybinding} from '../../helpers/use-keybinding';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
@@ -21,7 +21,7 @@ const BORDER_SIZE = 1;
const container: React.CSSProperties = {
paddingTop: MENU_VERTICAL_PADDING,
paddingBottom: MENU_VERTICAL_PADDING,
- border: `${BORDER_SIZE}px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
+ border: `${BORDER_SIZE}px solid ${BLACK_ALPHA_60}`,
marginLeft: 0 - BORDER_SIZE,
overflowY: 'auto',
overflowX: 'hidden',
diff --git a/packages/studio/src/components/NewComposition/RemInput.tsx b/packages/studio/src/components/NewComposition/RemInput.tsx
index 25511bb9e5..1522f0127e 100644
--- a/packages/studio/src/components/NewComposition/RemInput.tsx
+++ b/packages/studio/src/components/NewComposition/RemInput.tsx
@@ -10,10 +10,11 @@ import React, {
import {
FAIL_COLOR,
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_HOVERED,
- INPUT_BORDER_COLOR_UNHOVERED,
+ WHITE_ALPHA_05,
+ BLACK_ALPHA_60,
SELECTED_BACKGROUND,
WARNING_COLOR,
+ WHITE,
} from '../../helpers/colors';
import {useZIndex} from '../../state/z-index';
@@ -40,7 +41,7 @@ export const RightAlignInput: React.FC<PropsWithChildren> = ({children}) => {
export const inputBaseStyle: React.CSSProperties = {
padding: `${INPUT_HORIZONTAL_PADDING}px 10px`,
- color: 'white',
+ color: WHITE,
borderStyle: 'solid',
borderWidth: 1,
fontSize: 14,
@@ -68,8 +69,8 @@ export const getInputBorderColor = ({
: isFocused
? SELECTED_BACKGROUND
: isHovered
- ? INPUT_BORDER_COLOR_HOVERED
- : INPUT_BORDER_COLOR_UNHOVERED;
+ ? WHITE_ALPHA_05
+ : BLACK_ALPHA_60;
const RemInputForwardRef: React.ForwardRefRenderFunction<
HTMLInputElement,
diff --git a/packages/studio/src/components/NewComposition/RemTextarea.tsx b/packages/studio/src/components/NewComposition/RemTextarea.tsx
index 1c9ea746a5..9fa1cb6cc1 100644
--- a/packages/studio/src/components/NewComposition/RemTextarea.tsx
+++ b/packages/studio/src/components/NewComposition/RemTextarea.tsx
@@ -6,7 +6,7 @@ import React, {
useRef,
useState,
} from 'react';
-import {INPUT_BACKGROUND} from '../../helpers/colors';
+import {INPUT_BACKGROUND, WHITE} from '../../helpers/colors';
import {useZIndex} from '../../state/z-index';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
import {
@@ -24,7 +24,7 @@ type Props = React.DetailedHTMLProps<
const inputBaseStyle: React.CSSProperties = {
padding: `${INPUT_HORIZONTAL_PADDING}px 10px`,
- color: 'white',
+ color: WHITE,
borderStyle: 'solid',
borderWidth: 1,
fontSize: 14,
diff --git a/packages/studio/src/components/NewComposition/ValidationMessage.tsx b/packages/studio/src/components/NewComposition/ValidationMessage.tsx
index 915fc87211..fb56611acb 100644
--- a/packages/studio/src/components/NewComposition/ValidationMessage.tsx
+++ b/packages/studio/src/components/NewComposition/ValidationMessage.tsx
@@ -1,6 +1,6 @@
import type {SVGProps} from 'react';
import React, {useMemo} from 'react';
-import {FAIL_COLOR, WARNING_COLOR} from '../../helpers/colors';
+import {FAIL_COLOR, WARNING_COLOR, WHITE} from '../../helpers/colors';
import {Row, Spacing} from '../layout';
export const WarningTriangle: React.FC<SVGProps<SVGSVGElement>> = (props) => {
@@ -35,7 +35,7 @@ const row: React.CSSProperties = {
const label: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
fontFamily: 'sans-serif',
minWidth: 0,
whiteSpace: 'normal',
diff --git a/packages/studio/src/components/NoRegisterRoot.tsx b/packages/studio/src/components/NoRegisterRoot.tsx
index a3944032be..a91a0b9bdf 100644
--- a/packages/studio/src/components/NoRegisterRoot.tsx
+++ b/packages/studio/src/components/NoRegisterRoot.tsx
@@ -1,9 +1,10 @@
import React, {useEffect, useState} from 'react';
import {AbsoluteFill} from 'remotion';
+import {WHITE} from '../helpers/colors';
const label: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
fontFamily: 'Arial, Helvetica, sans-serif',
};
@@ -16,7 +17,7 @@ const container: React.CSSProperties = {
};
const link: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
textDecoration: 'none',
borderBottom: '1px solid',
};
diff --git a/packages/studio/src/components/Notifications/ColorDot.tsx b/packages/studio/src/components/Notifications/ColorDot.tsx
index 963ffe5039..096742e34d 100644
--- a/packages/studio/src/components/Notifications/ColorDot.tsx
+++ b/packages/studio/src/components/Notifications/ColorDot.tsx
@@ -1,10 +1,11 @@
import React, {useMemo} from 'react';
+import {BORDER_WHITE_ALPHA_20, RED} from '../../helpers/colors';
const container: React.CSSProperties = {
height: 16,
width: 16,
- backgroundColor: 'red',
- border: '1px solid rgba(255, 255, 255, 0.2)',
+ backgroundColor: RED,
+ border: BORDER_WHITE_ALPHA_20,
borderRadius: 8,
};
diff --git a/packages/studio/src/components/Notifications/Notification.tsx b/packages/studio/src/components/Notifications/Notification.tsx
index 946839702b..ccdf771675 100644
--- a/packages/studio/src/components/Notifications/Notification.tsx
+++ b/packages/studio/src/components/Notifications/Notification.tsx
@@ -1,16 +1,21 @@
import React, {useEffect} from 'react';
-import {TEXT_COLOR} from '../../helpers/colors';
+import {
+ NOTIFICATION_BACKGROUND,
+ NOTIFICATION_BORDER,
+ NOTIFICATION_SHADOW,
+ WHITE_HEX,
+} from '../../helpers/colors';
const notification: React.CSSProperties = {
- backgroundColor: '#111111',
- color: TEXT_COLOR,
+ backgroundColor: NOTIFICATION_BACKGROUND,
+ color: WHITE_HEX,
fontFamily: 'Arial, Helvetica, sans-serif',
display: 'inline-flex',
padding: '6px 14px',
borderRadius: 6,
fontSize: 13,
- border: '0.25px solid rgba(255, 255, 255, 0.1)',
- boxShadow: '0 2px 3px rgba(0, 0, 0, 1)',
+ border: NOTIFICATION_BORDER,
+ boxShadow: NOTIFICATION_SHADOW,
marginTop: 3,
marginBottom: 3,
alignItems: 'center',
diff --git a/packages/studio/src/components/Notifications/NotificationCenter.tsx b/packages/studio/src/components/Notifications/NotificationCenter.tsx
index 133e1a59ea..f5ae172740 100644
--- a/packages/studio/src/components/Notifications/NotificationCenter.tsx
+++ b/packages/studio/src/components/Notifications/NotificationCenter.tsx
@@ -4,6 +4,7 @@ import React, {
useImperativeHandle,
useState,
} from 'react';
+import {TRANSPARENT} from '../../helpers/colors';
import {Notification} from './Notification';
const container: React.CSSProperties = {
@@ -15,7 +16,7 @@ const container: React.CSSProperties = {
flexDirection: 'column',
paddingTop: 40,
pointerEvents: 'none',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
};
type TNotification = {
diff --git a/packages/studio/src/components/Notifications/ServerDisconnected.tsx b/packages/studio/src/components/Notifications/ServerDisconnected.tsx
index 0d8c71e70c..e4c179711c 100644
--- a/packages/studio/src/components/Notifications/ServerDisconnected.tsx
+++ b/packages/studio/src/components/Notifications/ServerDisconnected.tsx
@@ -1,5 +1,11 @@
import React, {useContext} from 'react';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
+import {
+ SERVER_DISCONNECTED_BACKGROUND,
+ SERVER_DISCONNECTED_SHADOW,
+ TRANSPARENT,
+ WHITE,
+} from '../../helpers/colors';
const container: React.CSSProperties = {
position: 'fixed',
@@ -11,19 +17,19 @@ const container: React.CSSProperties = {
flexDirection: 'column',
padding: 30,
pointerEvents: 'none',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
fontFamily: 'SF Pro, Arial, Helvetica, sans-serif',
};
const message: React.CSSProperties = {
- backgroundColor: '#e74c3c',
- color: 'white',
+ backgroundColor: SERVER_DISCONNECTED_BACKGROUND,
+ color: WHITE,
paddingLeft: 20,
paddingRight: 20,
paddingTop: 12,
paddingBottom: 12,
borderRadius: 4,
- boxShadow: '0 2px 4px rgba(0, 0, 0, 0.4)',
+ boxShadow: SERVER_DISCONNECTED_SHADOW,
lineHeight: 1.5,
};
diff --git a/packages/studio/src/components/OutlineToggle.tsx b/packages/studio/src/components/OutlineToggle.tsx
index 55d55d7f49..83092c63d5 100644
--- a/packages/studio/src/components/OutlineToggle.tsx
+++ b/packages/studio/src/components/OutlineToggle.tsx
@@ -1,5 +1,5 @@
import React, {useCallback, useContext} from 'react';
-import {BLUE} from '../helpers/colors';
+import {BLUE, WHITE} from '../helpers/colors';
import {EditorShowOutlinesContext} from '../state/editor-outlines';
import {ControlButton} from './ControlButton';
@@ -12,7 +12,7 @@ export const OutlineToggle: React.FC = () => {
setEditorShowOutlines((current) => !current);
}, [setEditorShowOutlines]);
- const color = editorShowOutlines ? BLUE : 'white';
+ const color = editorShowOutlines ? BLUE : WHITE;
const accessibilityLabel = editorShowOutlines
? 'Hide outlines'
: 'Show outlines';
diff --git a/packages/studio/src/components/PlayPause.tsx b/packages/studio/src/components/PlayPause.tsx
index b7645d4efa..0bd27048cc 100644
--- a/packages/studio/src/components/PlayPause.tsx
+++ b/packages/studio/src/components/PlayPause.tsx
@@ -1,6 +1,7 @@
import {PlayerInternals} from '@remotion/player';
import React, {useCallback, useEffect, useState} from 'react';
import {Internals} from 'remotion';
+import {WHITE} from '../helpers/colors';
import {useIsStill} from '../helpers/is-current-selected-still';
import {useKeybinding} from '../helpers/use-keybinding';
import {JumpToStart} from '../icons/jump-to-start';
@@ -15,18 +16,18 @@ import {ensureFrameIsInViewport} from './Timeline/timeline-scroll-logic';
const backStyle = {
height: 18,
- color: 'white',
+ color: WHITE,
};
const forwardBackStyle = {
height: 16,
- color: 'white',
+ color: WHITE,
};
const iconButton: React.CSSProperties = {
height: 14,
width: 14,
- color: 'white',
+ color: WHITE,
};
export const PlayPause: React.FC<{
diff --git a/packages/studio/src/components/PreviewToolbar.tsx b/packages/studio/src/components/PreviewToolbar.tsx
index 3502d968c4..206256ec2b 100644
--- a/packages/studio/src/components/PreviewToolbar.tsx
+++ b/packages/studio/src/components/PreviewToolbar.tsx
@@ -7,7 +7,11 @@ import React, {
} from 'react';
import {Internals} from 'remotion';
import {checkFullscreenSupport} from '../helpers/check-fullscreen-support';
-import {BACKGROUND, BACKGROUND__TRANSPARENT} from '../helpers/colors';
+import {
+ BACKGROUND,
+ BACKGROUND__TRANSPARENT,
+ BORDER_BLACK_ALPHA_50,
+} from '../helpers/colors';
import {
useIsStill,
useIsVideoComposition,
@@ -36,7 +40,7 @@ const TOOLBAR_HEIGHT = 50;
const container: React.CSSProperties = {
display: 'flex',
justifyContent: 'center',
- borderTop: '1px solid rgba(0, 0, 0, 0.5)',
+ borderTop: BORDER_BLACK_ALPHA_50,
alignItems: 'center',
flexDirection: 'row',
background: BACKGROUND,
diff --git a/packages/studio/src/components/QuickSwitcher/AlgoliaCredit.tsx b/packages/studio/src/components/QuickSwitcher/AlgoliaCredit.tsx
index 45c773b49c..68517ff064 100644
--- a/packages/studio/src/components/QuickSwitcher/AlgoliaCredit.tsx
+++ b/packages/studio/src/components/QuickSwitcher/AlgoliaCredit.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
const link: React.CSSProperties = {
display: 'inline-flex',
@@ -15,7 +16,7 @@ export const AlgoliaCredit: React.FC = () => {
<svg width="77" height="19" aria-label="Algolia" role="img">
<path
d="M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z"
- fill="currentColor"
+ fill={CURRENT_COLOR}
fillRule="evenodd"
/>
</svg>
diff --git a/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx b/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
index 91c4e08325..630c0c4b02 100644
--- a/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
+++ b/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
@@ -7,7 +7,7 @@ import React, {
useState,
} from 'react';
import {Internals} from 'remotion';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {isCompositionStill} from '../../helpers/is-composition-still';
import {useKeybinding} from '../../helpers/use-keybinding';
import {
@@ -58,7 +58,7 @@ const modeInactive: React.CSSProperties = {
const modeActive: React.CSSProperties = {
...modeItem,
- color: 'white',
+ color: WHITE,
fontWeight: 'bold',
};
diff --git a/packages/studio/src/components/QuickSwitcher/QuickSwitcherResult.tsx b/packages/studio/src/components/QuickSwitcher/QuickSwitcherResult.tsx
index 1f7fa823e7..459cebf466 100644
--- a/packages/studio/src/components/QuickSwitcher/QuickSwitcherResult.tsx
+++ b/packages/studio/src/components/QuickSwitcher/QuickSwitcherResult.tsx
@@ -1,5 +1,9 @@
import React, {useEffect, useMemo, useRef, useState} from 'react';
-import {LIGHT_TEXT, getBackgroundFromHoverState} from '../../helpers/colors';
+import {
+ LIGHT_TEXT,
+ WHITE,
+ getBackgroundFromHoverState,
+} from '../../helpers/colors';
import {useKeybinding} from '../../helpers/use-keybinding';
import {StillIcon} from '../../icons/still';
import {FilmIcon} from '../../icons/video';
@@ -127,7 +131,7 @@ export const QuickSwitcherResult: React.FC<{
result.type === 'search-result'
? LIGHT_TEXT
: selected || hovered
- ? 'white'
+ ? WHITE
: LIGHT_TEXT,
fontSize: QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE,
};
@@ -137,12 +141,9 @@ export const QuickSwitcherResult: React.FC<{
<div ref={ref} key={result.id} style={style} onClick={result.onSelected}>
{result.type === 'composition' ? (
result.compositionType === 'still' ? (
- <StillIcon
- color={selected ? 'white' : LIGHT_TEXT}
- style={iconStyle}
- />
+ <StillIcon color={selected ? WHITE : LIGHT_TEXT} style={iconStyle} />
) : (
- <FilmIcon color={selected ? 'white' : LIGHT_TEXT} style={iconStyle} />
+ <FilmIcon color={selected ? WHITE : LIGHT_TEXT} style={iconStyle} />
)
) : null}
<Spacing x={1} />
diff --git a/packages/studio/src/components/RefreshCompositionOverlay.tsx b/packages/studio/src/components/RefreshCompositionOverlay.tsx
index a463c68df4..ebda278b52 100644
--- a/packages/studio/src/components/RefreshCompositionOverlay.tsx
+++ b/packages/studio/src/components/RefreshCompositionOverlay.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import {AbsoluteFill} from 'remotion';
+import {SHADOW_BLACK} from '../helpers/colors';
import {RunningCalculateMetadata} from './RunningCalculateMetadata';
export const container: React.CSSProperties = {
@@ -10,7 +11,7 @@ export const container: React.CSSProperties = {
};
const shadow: React.CSSProperties = {
- boxShadow: '0 0 4px black',
+ boxShadow: SHADOW_BLACK,
};
export const RefreshCompositionOverlay: React.FC = () => {
diff --git a/packages/studio/src/components/RenderButton.tsx b/packages/studio/src/components/RenderButton.tsx
index 84c5b3cca9..b21eb270b3 100644
--- a/packages/studio/src/components/RenderButton.tsx
+++ b/packages/studio/src/components/RenderButton.tsx
@@ -15,8 +15,12 @@ import type {_InternalTypes} from 'remotion';
import {Internals} from 'remotion';
import {StudioServerConnectionCtx} from '../helpers/client-id';
import {
+ CURRENT_COLOR,
+ CURRENT_COLOR_LOWERCASE,
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
+ BLACK_ALPHA_60,
+ TRANSPARENT,
+ WHITE,
} from '../helpers/colors';
import {SHOW_BROWSER_RENDERING} from '../helpers/show-browser-rendering';
import {areKeyboardShortcutsDisabled} from '../helpers/use-keybinding';
@@ -42,7 +46,7 @@ const splitButtonContainer: React.CSSProperties = {
flexDirection: 'row',
alignItems: 'stretch',
borderRadius: 4,
- border: `1px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
+ border: `1px solid ${BLACK_ALPHA_60}`,
backgroundColor: INPUT_BACKGROUND,
overflow: 'hidden',
};
@@ -52,9 +56,9 @@ const mainButtonStyle: React.CSSProperties = {
paddingRight: 7,
paddingTop: 7,
paddingBottom: 7,
- background: 'transparent',
+ background: TRANSPARENT,
border: 'none',
- color: 'white',
+ color: WHITE,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
@@ -64,7 +68,7 @@ const mainButtonStyle: React.CSSProperties = {
const dividerStyle: React.CSSProperties = {
width: 1,
- backgroundColor: INPUT_BORDER_COLOR_UNHOVERED,
+ backgroundColor: BLACK_ALPHA_60,
alignSelf: 'stretch',
};
@@ -73,9 +77,9 @@ const dropdownTriggerStyle: React.CSSProperties = {
paddingRight: 6,
paddingTop: 7,
paddingBottom: 7,
- background: 'transparent',
+ background: TRANSPARENT,
border: 'none',
- color: 'white',
+ color: WHITE,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
@@ -229,7 +233,7 @@ export const RenderButton: React.FC<{readonly readOnlyStudio: boolean}> = ({
return {
style: {
height: 16,
- color: 'currentColor',
+ color: CURRENT_COLOR,
},
};
}, []);
@@ -488,7 +492,7 @@ export const RenderButton: React.FC<{readonly readOnlyStudio: boolean}> = ({
const containerStyle = useMemo((): React.CSSProperties => {
return {
...splitButtonContainer,
- borderColor: INPUT_BORDER_COLOR_UNHOVERED,
+ borderColor: BLACK_ALPHA_60,
opacity: canRender ? 1 : 0.7,
cursor: canRender ? 'pointer' : 'inherit',
};
@@ -541,7 +545,10 @@ export const RenderButton: React.FC<{readonly readOnlyStudio: boolean}> = ({
disabled={!canRender}
>
<Row align="center" style={mainButtonContent}>
- <ThinRenderIcon fill="currentcolor" svgProps={iconStyle} />
+ <ThinRenderIcon
+ fill={CURRENT_COLOR_LOWERCASE}
+ svgProps={iconStyle}
+ />
<Spacing x={1} />
<span style={label}>{renderLabel}</span>
</Row>
diff --git a/packages/studio/src/components/RenderModal/CliCopyButton.tsx b/packages/studio/src/components/RenderModal/CliCopyButton.tsx
index 5543cf88c2..4cee0e4d5d 100644
--- a/packages/studio/src/components/RenderModal/CliCopyButton.tsx
+++ b/packages/studio/src/components/RenderModal/CliCopyButton.tsx
@@ -1,5 +1,5 @@
import {useCallback, useEffect, useMemo, useState} from 'react';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {ClipboardIcon} from '../../icons/clipboard';
const svgStyle: React.CSSProperties = {
width: 16,
@@ -33,7 +33,7 @@ export const CliCopyButton: React.FC<{valueToCopy: string}> = ({
const [hovered, setHovered] = useState<boolean>(false);
const fillColor = useMemo(() => {
- return hovered ? 'white' : LIGHT_TEXT;
+ return hovered ? WHITE : LIGHT_TEXT;
}, [hovered]);
const clipboardIcon = <ClipboardIcon color={fillColor} style={svgStyle} />;
diff --git a/packages/studio/src/components/RenderModal/ClientRenderProgress.tsx b/packages/studio/src/components/RenderModal/ClientRenderProgress.tsx
index e2807e8fea..94db2642ff 100644
--- a/packages/studio/src/components/RenderModal/ClientRenderProgress.tsx
+++ b/packages/studio/src/components/RenderModal/ClientRenderProgress.tsx
@@ -1,6 +1,6 @@
import {formatBytes} from '@remotion/studio-shared';
import React from 'react';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {Spacing} from '../layout';
import {CircularProgress} from '../RenderQueue/CircularProgress';
import {getClientRenderProgressMessage} from '../RenderQueue/client-render-progress';
@@ -17,7 +17,7 @@ const progressItem: React.CSSProperties = {
const label: React.CSSProperties = {
fontSize: 14,
width: 400,
- color: 'white',
+ color: WHITE,
};
const right: React.CSSProperties = {
diff --git a/packages/studio/src/components/RenderModal/DataEditor.tsx b/packages/studio/src/components/RenderModal/DataEditor.tsx
index 0ef4cb627b..9889d0dffc 100644
--- a/packages/studio/src/components/RenderModal/DataEditor.tsx
+++ b/packages/studio/src/components/RenderModal/DataEditor.tsx
@@ -3,7 +3,7 @@ import type {_InternalTypes, SerializedJSONWithCustomFields} from 'remotion';
import {getInputProps} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BACKGROUND, BLUE, BORDER_COLOR, LIGHT_TEXT} from '../../helpers/colors';
+import {BACKGROUND, BLUE, BLACK_HEX, LIGHT_TEXT} from '../../helpers/colors';
import {CompactExplanation} from '../CompactExplanation';
import {useZodIfPossible} from '../get-zod-if-possible';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
@@ -86,7 +86,7 @@ const controlContainer: React.CSSProperties = {
flexDirection: 'column',
display: 'flex',
padding: 12,
- borderBottom: `1px solid ${BORDER_COLOR}`,
+ borderBottom: `1px solid ${BLACK_HEX}`,
};
const inspectorControlContainer: React.CSSProperties = {
diff --git a/packages/studio/src/components/RenderModal/GuiRenderStatus.tsx b/packages/studio/src/components/RenderModal/GuiRenderStatus.tsx
index 48ce3d495d..79425677ca 100644
--- a/packages/studio/src/components/RenderModal/GuiRenderStatus.tsx
+++ b/packages/studio/src/components/RenderModal/GuiRenderStatus.tsx
@@ -5,7 +5,7 @@ import type {
StitchingProgressInput,
} from '@remotion/studio-shared';
import React, {useCallback, useMemo} from 'react';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {Spacing} from '../layout';
import {openInFileExplorer} from '../RenderQueue/actions';
import {CircularProgress} from '../RenderQueue/CircularProgress';
@@ -22,7 +22,7 @@ const progressItem: React.CSSProperties = {
const label: React.CSSProperties = {
fontSize: 14,
width: 400,
- color: 'white',
+ color: WHITE,
};
const right: React.CSSProperties = {
diff --git a/packages/studio/src/components/RenderModal/InfoBubble.tsx b/packages/studio/src/components/RenderModal/InfoBubble.tsx
index 730828267e..c01a04dcc0 100644
--- a/packages/studio/src/components/RenderModal/InfoBubble.tsx
+++ b/packages/studio/src/components/RenderModal/InfoBubble.tsx
@@ -1,7 +1,7 @@
import {PlayerInternals} from '@remotion/player';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import ReactDOM from 'react-dom';
-import {INPUT_BACKGROUND, LIGHT_TEXT} from '../../helpers/colors';
+import {INPUT_BACKGROUND, LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {HigherZIndex, useZIndex} from '../../state/z-index';
import {getPortal} from '../Menu/portals';
import {outerPortal} from '../Menu/styles';
@@ -117,7 +117,7 @@ export const InfoBubble: React.FC<{
...container,
userSelect: 'none',
WebkitUserSelect: 'none',
- color: 'white',
+ color: WHITE,
display: 'inline-flex',
flexDirection: 'row',
alignItems: 'center',
@@ -136,7 +136,7 @@ export const InfoBubble: React.FC<{
>
<svg style={icon} viewBox="0 0 512 512">
<path
- fill={hovered ? 'white' : LIGHT_TEXT}
+ fill={hovered ? WHITE : LIGHT_TEXT}
d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24h80c13.3 0 24-10.7 24-24s-10.7-24-24-24h-8V248c0-13.3-10.7-24-24-24H216c-13.3 0-24 10.7-24 24s10.7 24 24 24h24v64H216zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"
/>
</svg>
diff --git a/packages/studio/src/components/RenderModal/InfoTooltip.tsx b/packages/studio/src/components/RenderModal/InfoTooltip.tsx
index 84e0da53e9..4a73a16ff8 100644
--- a/packages/studio/src/components/RenderModal/InfoTooltip.tsx
+++ b/packages/studio/src/components/RenderModal/InfoTooltip.tsx
@@ -1,5 +1,5 @@
import React, {useMemo} from 'react';
-import {BORDER_COLOR} from '../../helpers/colors';
+import {BLACK_HEX, WHITE} from '../../helpers/colors';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
import {SHADOW_TOWARDS_BOTTOM, SHADOW_TOWARDS_TOP} from '../Menu/styles';
@@ -30,8 +30,8 @@ export const InfoTooltip: React.FC<{
boxShadow:
arrowDirection === 'down' ? SHADOW_TOWARDS_TOP : SHADOW_TOWARDS_BOTTOM,
background: backgroundColor,
- color: 'white',
- border: '0.5px solid ' + BORDER_COLOR,
+ color: WHITE,
+ border: '0.5px solid ' + BLACK_HEX,
maxHeight: 200,
overflow: 'auto',
borderRadius: '4px',
@@ -54,7 +54,7 @@ export const InfoTooltip: React.FC<{
d={`M 14 0 L 7 7 L 0 0`}
fill={backgroundColor}
strokeLinecap="butt"
- stroke={BORDER_COLOR}
+ stroke={BLACK_HEX}
strokeWidth={0.5}
/>
</svg>
@@ -65,7 +65,7 @@ export const InfoTooltip: React.FC<{
d={`M 0 7 L 7 0 L 14 7`}
fill={backgroundColor}
strokeLinecap="butt"
- stroke={BORDER_COLOR}
+ stroke={BLACK_HEX}
strokeWidth={0.5}
/>
</svg>
diff --git a/packages/studio/src/components/RenderModal/InlineEyeIcon.tsx b/packages/studio/src/components/RenderModal/InlineEyeIcon.tsx
index a1b4f9619d..d25c9c1eb7 100644
--- a/packages/studio/src/components/RenderModal/InlineEyeIcon.tsx
+++ b/packages/studio/src/components/RenderModal/InlineEyeIcon.tsx
@@ -1,10 +1,11 @@
import {useCallback} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
const clearIcon: React.CSSProperties = {
height: 14,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
export const InlineEyeButton: React.FC<{
diff --git a/packages/studio/src/components/RenderModal/InlineRemoveButton.tsx b/packages/studio/src/components/RenderModal/InlineRemoveButton.tsx
index b38691a8a0..a75b127e55 100644
--- a/packages/studio/src/components/RenderModal/InlineRemoveButton.tsx
+++ b/packages/studio/src/components/RenderModal/InlineRemoveButton.tsx
@@ -1,10 +1,11 @@
import {useCallback} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
const clearIcon: React.CSSProperties = {
height: 14,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
export const InlineRemoveButton: React.FC<{
diff --git a/packages/studio/src/components/RenderModal/MultiRangeSlider.tsx b/packages/studio/src/components/RenderModal/MultiRangeSlider.tsx
index 11bb890adc..7cb6fe22c0 100644
--- a/packages/studio/src/components/RenderModal/MultiRangeSlider.tsx
+++ b/packages/studio/src/components/RenderModal/MultiRangeSlider.tsx
@@ -1,9 +1,9 @@
import type {ChangeEvent, FC} from 'react';
import React, {useCallback, useMemo} from 'react';
-import {BLUE, INPUT_BACKGROUND} from '../../helpers/colors';
+import {BLACK, BLUE, INPUT_BACKGROUND} from '../../helpers/colors';
const container: React.CSSProperties = {
- borderColor: 'black',
+ borderColor: BLACK,
borderStyle: 'solid',
borderWidth: '2px',
height: 39,
diff --git a/packages/studio/src/components/RenderModal/OptionExplainer.tsx b/packages/studio/src/components/RenderModal/OptionExplainer.tsx
index 9db3463255..2823c99d1a 100644
--- a/packages/studio/src/components/RenderModal/OptionExplainer.tsx
+++ b/packages/studio/src/components/RenderModal/OptionExplainer.tsx
@@ -1,6 +1,6 @@
import type {AnyRemotionOption} from '@remotion/renderer';
import React from 'react';
-import {INPUT_BACKGROUND} from '../../helpers/colors';
+import {BLUE, INPUT_BACKGROUND, WHITE} from '../../helpers/colors';
import {Spacing} from '../layout';
import {MenuDivider} from '../Menu/MenuDivider';
import {CliCopyButton} from './CliCopyButton';
@@ -31,7 +31,7 @@ const description: React.CSSProperties = {
const link: React.CSSProperties = {
fontSize: 14,
maxWidth: 200,
- color: '#0b84f3',
+ color: BLUE,
wordWrap: 'break-word',
textDecoration: 'none',
};
@@ -47,7 +47,7 @@ const infoRow: React.CSSProperties = {
const infoRowLabel: React.CSSProperties = {
width: 150,
fontSize: 14,
- color: 'white',
+ color: WHITE,
};
const flexSpacer: React.CSSProperties = {
diff --git a/packages/studio/src/components/RenderModal/RenderModalHr.tsx b/packages/studio/src/components/RenderModal/RenderModalHr.tsx
index 9880012b2f..8a0ed1788b 100644
--- a/packages/studio/src/components/RenderModal/RenderModalHr.tsx
+++ b/packages/studio/src/components/RenderModal/RenderModalHr.tsx
@@ -1,10 +1,11 @@
import React from 'react';
+import {BORDER_BLACK} from '../../helpers/colors';
const hrStyle: React.CSSProperties = {
margin: '0 0 0 0',
padding: '0 0 0 0',
border: 'none',
- borderTop: '1px solid #000',
+ borderTop: BORDER_BLACK,
marginRight: 16,
marginLeft: 16,
marginTop: 8,
diff --git a/packages/studio/src/components/RenderModal/RenderStatusModal.tsx b/packages/studio/src/components/RenderModal/RenderStatusModal.tsx
index 34b23ffbbf..cc28145e83 100644
--- a/packages/studio/src/components/RenderModal/RenderStatusModal.tsx
+++ b/packages/studio/src/components/RenderModal/RenderStatusModal.tsx
@@ -1,5 +1,6 @@
import type {RenderJob} from '@remotion/studio-shared';
import React, {useCallback, useContext} from 'react';
+import {RENDER_STATUS_BACKGROUND} from '../../helpers/colors';
import {
makeClientRetryPayload,
makeRetryPayload,
@@ -28,7 +29,7 @@ const container: React.CSSProperties = {
};
const codeBlock: React.CSSProperties = {
- backgroundColor: '#222',
+ backgroundColor: RENDER_STATUS_BACKGROUND,
whiteSpace: 'pre',
padding: 12,
borderRadius: 4,
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaLabel.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
index 40d2b562a7..ffc1cbce26 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
@@ -1,5 +1,5 @@
import React, {useCallback, useMemo, useState} from 'react';
-import {FAIL_COLOR, LIGHT_TEXT} from '../../../helpers/colors';
+import {FAIL_COLOR, LIGHT_TEXT, WHITE} from '../../../helpers/colors';
import {Flex} from '../../layout';
import {InlineRemoveButton} from '../InlineRemoveButton';
import {getSchemaLabel} from './get-schema-label';
@@ -29,11 +29,7 @@ export const SchemaLabel: React.FC<{
return {
fontFamily: 'monospace',
fontSize: 12,
- color: valid
- ? clickableButtonHovered
- ? 'white'
- : LIGHT_TEXT
- : FAIL_COLOR,
+ color: valid ? (clickableButtonHovered ? WHITE : LIGHT_TEXT) : FAIL_COLOR,
lineHeight: '20px',
};
}, [clickableButtonHovered, valid]);
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaResetButton.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaResetButton.tsx
index f5e21fea71..0c6ee39111 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaResetButton.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaResetButton.tsx
@@ -1,10 +1,11 @@
import React, {useCallback} from 'react';
+import {CURRENT_COLOR} from '../../../helpers/colors';
import type {RenderInlineAction} from '../../InlineAction';
import {InlineAction} from '../../InlineAction';
const icon: React.CSSProperties = {
height: 14,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
export const SchemaResetButton: React.FC<{
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
index a13263d841..95856502ae 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
@@ -1,5 +1,10 @@
import React, {useCallback, useMemo, useState} from 'react';
-import {BACKGROUND, LIGHT_TEXT, LINE_COLOR} from '../../../helpers/colors';
+import {
+ BACKGROUND,
+ LIGHT_TEXT,
+ LINE_COLOR,
+ WHITE,
+} from '../../../helpers/colors';
import {Plus} from '../../../icons/plus';
import {
useZodIfPossible,
@@ -134,7 +139,7 @@ export const SchemaArrayItemSeparationLine: React.FC<{
onPointerLeave={onInnerMouseLeave}
>
<Plus
- color={innerHovered ? 'white' : LIGHT_TEXT}
+ color={innerHovered ? WHITE : LIGHT_TEXT}
style={{
display: 'block',
height: VERTICAL_GUIDE_HEIGHT / 2,
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaVerticalGuide.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaVerticalGuide.tsx
index 1130886b21..154f66990d 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaVerticalGuide.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaVerticalGuide.tsx
@@ -1,4 +1,5 @@
import React, {useMemo} from 'react';
+import {LINE_COLOR} from '../../../helpers/colors';
import {VERTICAL_GUIDE_HEIGHT} from './SchemaSeparationLine';
const flex: React.CSSProperties = {
@@ -24,7 +25,7 @@ export const SchemaVerticalGuide: React.FC<{
: {
height: `calc(100% - ${VERTICAL_GUIDE_HEIGHT / 2}px)`,
width: 1,
- background: '#363A3E',
+ background: LINE_COLOR,
position: 'absolute',
};
}, [isRoot]);
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDateEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
index 572c85e6cd..1338c59b32 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
@@ -1,6 +1,6 @@
import {useMemo} from 'react';
import React, {useCallback} from 'react';
-import {VERY_LIGHT_TEXT} from '../../../helpers/colors';
+import {WHITE_ALPHA_30} from '../../../helpers/colors';
import {Spacing} from '../../layout';
import {RemotionInput} from '../../NewComposition/RemInput';
import {Fieldset} from './Fieldset';
@@ -17,7 +17,7 @@ const fullWidth: React.CSSProperties = {
const explainer: React.CSSProperties = {
fontFamily: 'sans-serif',
fontSize: 12,
- color: VERY_LIGHT_TEXT,
+ color: WHITE_ALPHA_30,
};
// This will do 2 things:
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx
index 473a1da5f1..f55b18d4c6 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx
@@ -1,5 +1,5 @@
import React, {useMemo} from 'react';
-import {FAIL_COLOR, LIGHT_TEXT} from '../../../helpers/colors';
+import {FAIL_COLOR, LIGHT_TEXT, WHITE} from '../../../helpers/colors';
import {Spacing} from '../../layout';
import {WarningTriangle} from '../../NewComposition/ValidationMessage';
import type {ZodSafeParseResult} from './zod-schema-type';
@@ -15,7 +15,7 @@ const compactSchemaLabel: React.CSSProperties = {
};
const jsonLabel: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
fontSize: 13,
fontFamily: 'sans-serif',
display: 'flex',
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx
index 5c36043c14..80543bb3b6 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {VERY_LIGHT_TEXT} from '../../../helpers/colors';
+import {WHITE_ALPHA_30} from '../../../helpers/colors';
import {Fieldset} from './Fieldset';
import {SchemaLabel} from './SchemaLabel';
import type {JSONPath} from './zod-types';
@@ -10,7 +10,7 @@ const fullWidth: React.CSSProperties = {
const emptyLabel: React.CSSProperties = {
width: '100%',
- color: VERY_LIGHT_TEXT,
+ color: WHITE_ALPHA_30,
fontFamily: 'sans-serif',
fontSize: 14,
};
diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts b/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts
index 08d85c4e54..7435f25471 100644
--- a/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts
+++ b/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts
@@ -1,3 +1,4 @@
+import {WHITE_FULL_HEX} from '../../../helpers/colors';
import type {ZodTypesType} from '../../get-zod-if-possible';
import {
type AnyZodSchema,
@@ -37,7 +38,7 @@ export const createZodValues = (
const description = getZodSchemaDescription(schema);
if (zodTypes) {
if (description === zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
- return '#ffffff';
+ return WHITE_FULL_HEX;
}
if (description === zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND) {
diff --git a/packages/studio/src/components/RenderModal/ServerRenderModal.tsx b/packages/studio/src/components/RenderModal/ServerRenderModal.tsx
index 2ec540b784..1f077a8a1d 100644
--- a/packages/studio/src/components/RenderModal/ServerRenderModal.tsx
+++ b/packages/studio/src/components/RenderModal/ServerRenderModal.tsx
@@ -29,7 +29,11 @@ import React, {
} from 'react';
import type {_InternalTypes} from 'remotion';
import {ShortcutHint} from '../../error-overlay/remotion-overlay/ShortcutHint';
-import {BLUE, BLUE_DISABLED} from '../../helpers/colors';
+import {
+ BLUE,
+ BLUE_DISABLED,
+ CURRENT_COLOR_LOWERCASE,
+} from '../../helpers/colors';
import {
envVariablesArrayToObject,
envVariablesObjectToArray,
@@ -1491,7 +1495,7 @@ const RenderModal: React.FC<
onClick={() => setTab('encoding')}
>
<div style={iconContainer}>
- <FilmIcon style={icon} color="currentcolor" />
+ <FilmIcon style={icon} color={CURRENT_COLOR_LOWERCASE} />
</div>
Encoding
</VerticalTab>
diff --git a/packages/studio/src/components/RenderModal/WarningIndicatorButton.tsx b/packages/studio/src/components/RenderModal/WarningIndicatorButton.tsx
index c171f7624d..c91f7fdc5f 100644
--- a/packages/studio/src/components/RenderModal/WarningIndicatorButton.tsx
+++ b/packages/studio/src/components/RenderModal/WarningIndicatorButton.tsx
@@ -2,10 +2,12 @@ import type {SVGProps} from 'react';
import React, {useCallback, useMemo} from 'react';
import {
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_HOVERED,
- INPUT_BORDER_COLOR_UNHOVERED,
+ WHITE_ALPHA_05,
+ BLACK_ALPHA_60,
LIGHT_TEXT,
+ TRANSPARENT,
WARNING_COLOR,
+ WHITE,
} from '../../helpers/colors';
import {AngleDown} from '../../icons/caret';
import {Spacing} from '../layout';
@@ -15,7 +17,7 @@ const style: React.CSSProperties = {
display: 'inline-flex',
justifyContent: 'center',
alignItems: 'center',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
color: LIGHT_TEXT,
borderStyle: 'solid',
borderWidth: 1,
@@ -69,11 +71,9 @@ export const WarningIndicatorButton: React.FC<{
const buttonStyle: React.CSSProperties = useMemo(() => {
return {
...(size === 'compact' ? compactStyle : style),
- backgroundColor: showWarning ? INPUT_BACKGROUND : 'transparent',
- borderColor: showWarning
- ? INPUT_BORDER_COLOR_HOVERED
- : INPUT_BORDER_COLOR_UNHOVERED,
- color: showWarning ? 'white' : LIGHT_TEXT,
+ backgroundColor: showWarning ? INPUT_BACKGROUND : TRANSPARENT,
+ borderColor: showWarning ? WHITE_ALPHA_05 : BLACK_ALPHA_60,
+ color: showWarning ? WHITE : LIGHT_TEXT,
};
}, [showWarning, size]);
diff --git a/packages/studio/src/components/RenderModal/WebRenderModalAudio.tsx b/packages/studio/src/components/RenderModal/WebRenderModalAudio.tsx
index 050275e6e7..d19ec756ea 100644
--- a/packages/studio/src/components/RenderModal/WebRenderModalAudio.tsx
+++ b/packages/studio/src/components/RenderModal/WebRenderModalAudio.tsx
@@ -5,6 +5,11 @@ import type {
} from '@remotion/web-renderer';
import {getSupportedAudioCodecsForContainer} from '@remotion/web-renderer';
import React, {useMemo} from 'react';
+import {
+ BORDER_INFO_BLUE,
+ INFO_BLUE,
+ INFO_BLUE_BACKGROUND,
+} from '../../helpers/colors';
import {Checkmark} from '../../icons/Checkmark';
import {Spacing} from '../layout';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
@@ -22,8 +27,8 @@ const container: React.CSSProperties = {
};
const fallbackNoticeStyle: React.CSSProperties = {
- backgroundColor: 'rgba(59, 130, 246, 0.15)',
- border: '1px solid rgba(59, 130, 246, 0.4)',
+ backgroundColor: INFO_BLUE_BACKGROUND,
+ border: BORDER_INFO_BLUE,
borderRadius: 4,
padding: '8px 12px',
marginLeft: 16,
@@ -31,7 +36,7 @@ const fallbackNoticeStyle: React.CSSProperties = {
marginTop: 8,
fontSize: 13,
lineHeight: 1.4,
- color: '#60a5fa',
+ color: INFO_BLUE,
};
const humanReadableWebAudioCodec = (
diff --git a/packages/studio/src/components/RenderModal/WebRenderModalLicense.tsx b/packages/studio/src/components/RenderModal/WebRenderModalLicense.tsx
index 7187165a91..4b44a9596a 100644
--- a/packages/studio/src/components/RenderModal/WebRenderModalLicense.tsx
+++ b/packages/studio/src/components/RenderModal/WebRenderModalLicense.tsx
@@ -2,8 +2,9 @@ import React, {useCallback, useEffect, useState} from 'react';
import {
BLUE,
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
+ BLACK_ALPHA_60,
LIGHT_TEXT,
+ WHITE,
} from '../../helpers/colors';
import {Checkbox} from '../Checkbox';
import {Spacing} from '../layout';
@@ -48,7 +49,7 @@ const paddedDescriptionStyle: React.CSSProperties = {
fontSize: 14,
fontFamily: 'sans-serif',
padding: 9,
- border: '1px solid ' + INPUT_BORDER_COLOR_UNHOVERED,
+ border: '1px solid ' + BLACK_ALPHA_60,
borderRadius: 8,
lineHeight: 1.5,
marginLeft: 16,
@@ -56,7 +57,7 @@ const paddedDescriptionStyle: React.CSSProperties = {
};
const descriptionLink: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
fontSize: 14,
};
diff --git a/packages/studio/src/components/RenderModal/WebRenderModalPicture.tsx b/packages/studio/src/components/RenderModal/WebRenderModalPicture.tsx
index 62dc850857..06f424d5eb 100644
--- a/packages/studio/src/components/RenderModal/WebRenderModalPicture.tsx
+++ b/packages/studio/src/components/RenderModal/WebRenderModalPicture.tsx
@@ -1,6 +1,7 @@
import type {WebRendererQuality} from '@remotion/web-renderer';
import type React from 'react';
import {useCallback, useMemo} from 'react';
+import {TRANSPARENT} from '../../helpers/colors';
import {Checkbox} from '../Checkbox';
import {Combobox} from '../NewComposition/ComboBox';
import {label, optionRow, rightRow} from './layout';
@@ -89,7 +90,7 @@ export const WebRenderModalPicture: React.FC<WebRenderModalPictureProps> = ({
<Checkbox
checked={transparent}
onChange={onTransparentChanged}
- name="transparent"
+ name={TRANSPARENT}
/>
</div>
</div>
diff --git a/packages/studio/src/components/RenderModal/render-modals.ts b/packages/studio/src/components/RenderModal/render-modals.ts
index 385c24d00f..417c82a4d5 100644
--- a/packages/studio/src/components/RenderModal/render-modals.ts
+++ b/packages/studio/src/components/RenderModal/render-modals.ts
@@ -1,5 +1,10 @@
import type React from 'react';
-import {BLUE} from '../../helpers/colors';
+import {
+ BLUE,
+ BORDER_BLACK,
+ CURRENT_COLOR_LOWERCASE,
+ WHITE,
+} from '../../helpers/colors';
import {getMaxModalHeight, getMaxModalWidth} from '../ModalContainer';
export const outerModalStyle: React.CSSProperties = {
@@ -15,7 +20,7 @@ export const container: React.CSSProperties = {
flexDirection: 'row',
alignItems: 'center',
padding: '12px 16px',
- borderBottom: '1px solid black',
+ borderBottom: BORDER_BLACK,
};
export const optionsPanel: React.CSSProperties = {
@@ -57,13 +62,13 @@ export const iconContainer: React.CSSProperties = {
};
export const icon: React.CSSProperties = {
- color: 'currentcolor',
+ color: CURRENT_COLOR_LOWERCASE,
height: 20,
};
export const buttonStyle: React.CSSProperties = {
backgroundColor: BLUE,
- color: 'white',
+ color: WHITE,
};
export const flexer: React.CSSProperties = {
diff --git a/packages/studio/src/components/RenderPreview.tsx b/packages/studio/src/components/RenderPreview.tsx
index c206fde048..5f2e6be42c 100644
--- a/packages/studio/src/components/RenderPreview.tsx
+++ b/packages/studio/src/components/RenderPreview.tsx
@@ -1,6 +1,6 @@
import React, {useContext, useEffect, useState} from 'react';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../helpers/colors';
import type {AssetMetadata} from '../helpers/get-asset-metadata';
import {remotion_outputsBase} from '../helpers/get-asset-metadata';
import {getPreviewFileType} from '../helpers/get-preview-file-type';
@@ -8,7 +8,7 @@ import {FilePreview} from './FilePreview';
const msgStyle: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
fontFamily: 'sans-serif',
display: 'flex',
justifyContent: 'center',
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueCopyToClipboard.tsx b/packages/studio/src/components/RenderQueue/RenderQueueCopyToClipboard.tsx
index fd2f81d591..1d2d0e7c53 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueCopyToClipboard.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueCopyToClipboard.tsx
@@ -1,5 +1,6 @@
import type {RenderJob} from '@remotion/studio-shared';
import {useCallback} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import {remotion_outputsBase} from '../../helpers/get-asset-metadata';
import {ClipboardIcon} from '../../icons/clipboard';
import type {RenderInlineAction} from '../InlineAction';
@@ -8,7 +9,7 @@ import {showNotification} from '../Notifications/NotificationCenter';
const revealIconStyle: React.CSSProperties = {
height: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
export const supportsCopyingToClipboard = (job: RenderJob) => {
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueDownloadItem.tsx b/packages/studio/src/components/RenderQueue/RenderQueueDownloadItem.tsx
index 5c304cc312..f4bbd5e202 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueDownloadItem.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueDownloadItem.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useMemo} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
import {showNotification} from '../Notifications/NotificationCenter';
@@ -30,7 +31,7 @@ export const RenderQueueDownloadItem: React.FC<{
const icon: React.CSSProperties = useMemo(() => {
return {
height: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
}, []);
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueItemCancelButton.tsx b/packages/studio/src/components/RenderQueue/RenderQueueItemCancelButton.tsx
index f459933823..1778728837 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueItemCancelButton.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueItemCancelButton.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useContext, useMemo} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
import {showNotification} from '../Notifications/NotificationCenter';
@@ -31,7 +32,7 @@ export const RenderQueueCancelButton: React.FC<{
const icon: React.CSSProperties = useMemo(() => {
return {
height: 14,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
}, []);
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueItemStatus.tsx b/packages/studio/src/components/RenderQueue/RenderQueueItemStatus.tsx
index 499256ca8a..50d932b851 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueItemStatus.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueItemStatus.tsx
@@ -1,5 +1,5 @@
import React, {useCallback, useContext} from 'react';
-import {FAIL_COLOR, LIGHT_TEXT} from '../../helpers/colors';
+import {FAIL_COLOR, LIGHT_TEXT, WHITE} from '../../helpers/colors';
import {ModalsContext} from '../../state/modals';
import {
CircularProgress,
@@ -83,7 +83,7 @@ export const RenderQueueItemStatus: React.FC<{
>
<svg style={iconStyle} viewBox="0 0 512 512">
<path
- fill={hovered ? 'white' : LIGHT_TEXT}
+ fill={hovered ? WHITE : LIGHT_TEXT}
d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337l-17 17-17-17-64-64-17-17L160 222.1l17 17 47 47L335 175l17-17L385.9 192l-17 17z"
/>
</svg>
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueOpenInFolder.tsx b/packages/studio/src/components/RenderQueue/RenderQueueOpenInFolder.tsx
index 24173fc9b6..e9cce2dadc 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueOpenInFolder.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueOpenInFolder.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useMemo} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import {ExpandedFolderIconSolid} from '../../icons/folder';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
@@ -22,7 +23,7 @@ export const RenderQueueOpenInFinderItem: React.FC<{
const icon: React.CSSProperties = useMemo(() => {
return {
height: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
}, []);
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueRemoveItem.tsx b/packages/studio/src/components/RenderQueue/RenderQueueRemoveItem.tsx
index 6f7192addd..d25dc04e03 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueRemoveItem.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueRemoveItem.tsx
@@ -1,6 +1,7 @@
import React, {useCallback, useContext, useMemo} from 'react';
import {Internals} from 'remotion';
import {unregisterClientRender} from '../../api/save-render-output';
+import {CURRENT_COLOR} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
import {InlineAction} from '../InlineAction';
import {showNotification} from '../Notifications/NotificationCenter';
@@ -50,7 +51,7 @@ export const RenderQueueRemoveItem: React.FC<{
const icon: React.CSSProperties = useMemo(() => {
return {
height: 16,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
}, []);
diff --git a/packages/studio/src/components/RenderQueue/RenderQueueRepeat.tsx b/packages/studio/src/components/RenderQueue/RenderQueueRepeat.tsx
index 46a5278a44..cc2d967486 100644
--- a/packages/studio/src/components/RenderQueue/RenderQueueRepeat.tsx
+++ b/packages/studio/src/components/RenderQueue/RenderQueueRepeat.tsx
@@ -1,5 +1,6 @@
import type {RenderJob} from '@remotion/studio-shared';
import React, {useCallback, useContext, useMemo} from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
import {useMobileLayout} from '../../helpers/mobile-layout';
import {
makeClientRetryPayload,
@@ -55,7 +56,7 @@ export const RenderQueueRepeatItem: React.FC<{
const icon: React.CSSProperties = useMemo(() => {
return {
height: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
};
}, []);
diff --git a/packages/studio/src/components/RenderQueue/index.tsx b/packages/studio/src/components/RenderQueue/index.tsx
index 9909e083f9..6773b1151f 100644
--- a/packages/studio/src/components/RenderQueue/index.tsx
+++ b/packages/studio/src/components/RenderQueue/index.tsx
@@ -1,7 +1,7 @@
import React, {useContext, useEffect, useMemo} from 'react';
import {Internals} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BACKGROUND, BORDER_COLOR, LIGHT_TEXT} from '../../helpers/colors';
+import {BACKGROUND, BLACK_HEX, LIGHT_TEXT} from '../../helpers/colors';
import {SHOW_BROWSER_RENDERING} from '../../helpers/show-browser-rendering';
import {Spacing} from '../layout';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
@@ -9,7 +9,7 @@ import {RenderQueueContext} from './context';
import {RenderQueueItem} from './RenderQueueItem';
const separatorStyle: React.CSSProperties = {
- borderBottom: `1px solid ${BORDER_COLOR}`,
+ borderBottom: `1px solid ${BLACK_HEX}`,
};
const errorExplanation: React.CSSProperties = {
diff --git a/packages/studio/src/components/RendersTab.tsx b/packages/studio/src/components/RendersTab.tsx
index 4fbe6e0510..c78c58a423 100644
--- a/packages/studio/src/components/RendersTab.tsx
+++ b/packages/studio/src/components/RendersTab.tsx
@@ -1,6 +1,6 @@
import type {MouseEventHandler} from 'react';
import React, {useContext, useMemo} from 'react';
-import {FAIL_COLOR, LIGHT_TEXT} from '../helpers/colors';
+import {FAIL_COLOR, LIGHT_TEXT, TRANSPARENT, WHITE} from '../helpers/colors';
import {Flex} from './layout';
import {RenderQueueContext} from './RenderQueue/context';
import {Tab} from './Tabs';
@@ -35,8 +35,8 @@ export const RendersTab: React.FC<{
const badgeStyle: React.CSSProperties = useMemo(() => {
return {
...badge,
- backgroundColor: failedJobs > 0 ? FAIL_COLOR : 'transparent',
- color: failedJobs > 0 ? 'white' : LIGHT_TEXT,
+ backgroundColor: failedJobs > 0 ? FAIL_COLOR : TRANSPARENT,
+ color: failedJobs > 0 ? WHITE : LIGHT_TEXT,
borderWidth: failedJobs > 0 ? 0 : 1,
borderStyle: 'solid',
borderColor: LIGHT_TEXT,
diff --git a/packages/studio/src/components/SegmentedControl.tsx b/packages/studio/src/components/SegmentedControl.tsx
index 1b9fff62d2..c2d3c521a4 100644
--- a/packages/studio/src/components/SegmentedControl.tsx
+++ b/packages/studio/src/components/SegmentedControl.tsx
@@ -2,8 +2,10 @@ import type {PropsWithChildren} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
import {
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_UNHOVERED,
+ BLACK_ALPHA_60,
LIGHT_TEXT,
+ TRANSPARENT,
+ WHITE,
} from '../helpers/colors';
import {useZIndex} from '../state/z-index';
@@ -11,7 +13,7 @@ const container: React.CSSProperties = {
display: 'flex',
flexDirection: 'row',
overflow: 'hidden',
- border: '1px solid ' + INPUT_BORDER_COLOR_UNHOVERED,
+ border: '1px solid ' + BLACK_ALPHA_60,
flexWrap: 'wrap',
maxWidth: 350,
justifyContent: 'flex-end',
@@ -106,8 +108,8 @@ const Item: React.FC<
const itemStyle: React.CSSProperties = useMemo(() => {
return {
...(size === 'compact' ? compactItem : item),
- backgroundColor: selected ? INPUT_BACKGROUND : 'transparent',
- color: selected ? 'white' : hovered ? 'white' : LIGHT_TEXT,
+ backgroundColor: selected ? INPUT_BACKGROUND : TRANSPARENT,
+ color: selected ? WHITE : hovered ? WHITE : LIGHT_TEXT,
};
}, [hovered, selected, size]);
diff --git a/packages/studio/src/components/SelectedOutlineElement.tsx b/packages/studio/src/components/SelectedOutlineElement.tsx
index 4e9210b960..c19658b7a9 100644
--- a/packages/studio/src/components/SelectedOutlineElement.tsx
+++ b/packages/studio/src/components/SelectedOutlineElement.tsx
@@ -4,7 +4,12 @@ import type {ResolvedStackLocation} from 'remotion';
import {Internals} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {BLUE} from '../helpers/colors';
+import {
+ BLUE,
+ SELECTED_OUTLINE_DROP_SHADOW,
+ TIMELINE_DROP_BLUE_ALPHA_12,
+ TRANSPARENT,
+} from '../helpers/colors';
import {formatFileLocation} from '../helpers/format-file-location';
import {openOriginalPositionInEditor} from '../helpers/open-in-editor';
import {ModalsContext} from '../state/modals';
@@ -431,7 +436,7 @@ const SelectedOutlineTransformOriginHandle: React.FC<{
onPointerDown={onPointerDown}
aria-hidden="true"
style={{
- filter: 'drop-shadow(0 0 1px rgba(255, 255, 255, 0.2))',
+ filter: SELECTED_OUTLINE_DROP_SHADOW,
}}
>
<circle
@@ -796,7 +801,7 @@ const SelectedOutlinePolygon: React.FC<{
<polygon
ref={polygonRef}
points={points}
- fill={effectDropHovered ? 'rgba(0, 155, 255, 0.12)' : 'transparent'}
+ fill={effectDropHovered ? TIMELINE_DROP_BLUE_ALPHA_12 : TRANSPARENT}
stroke={BLUE}
strokeOpacity={visible || effectDropHovered ? 1 : 0}
strokeWidth={2}
@@ -1070,7 +1075,7 @@ const SelectedOutlineScaleEdgeLine: React.FC<{
y1={edgeInfo.start.y}
x2={edgeInfo.end.x}
y2={edgeInfo.end.y}
- stroke="transparent"
+ stroke={TRANSPARENT}
strokeWidth={12}
vectorEffect="non-scaling-stroke"
pointerEvents="stroke"
@@ -1404,8 +1409,8 @@ const SelectedOutlineRotationCornerHandle: React.FC<{
cx={cornerInfo.point.x}
cy={cornerInfo.point.y}
r={12}
- fill="transparent"
- stroke="transparent"
+ fill={TRANSPARENT}
+ stroke={TRANSPARENT}
vectorEffect="non-scaling-stroke"
pointerEvents="all"
cursor={cornerInfo.cursor}
diff --git a/packages/studio/src/components/SelectedOutlineUvControls.tsx b/packages/studio/src/components/SelectedOutlineUvControls.tsx
index ab40c8a0f7..289cf0b996 100644
--- a/packages/studio/src/components/SelectedOutlineUvControls.tsx
+++ b/packages/studio/src/components/SelectedOutlineUvControls.tsx
@@ -1,6 +1,6 @@
import React, {useContext, useMemo} from 'react';
import {Internals} from 'remotion';
-import {BLUE} from '../helpers/colors';
+import {BLUE, SELECTED_OUTLINE_UV_DROP_SHADOW, WHITE} from '../helpers/colors';
import type {SequenceNodePathInfo} from '../helpers/get-timeline-sequence-sort-key';
import {
forceSpecificCursor,
@@ -58,7 +58,7 @@ const uvHandleRadius = 4.25;
const selectedUvHandleRadius = 6.8;
const ellipseControlRadius = 5.2;
const uvHandleStyle: React.CSSProperties = {
- filter: 'drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28))',
+ filter: SELECTED_OUTLINE_UV_DROP_SHADOW,
};
export const getSelectedOutlineUvHandleTimelineSelection = ({
@@ -420,7 +420,7 @@ const SelectedUvEllipseStartHandle: React.FC<{
cx={startControl.position.x}
cy={startControl.position.y}
r={ellipseControlRadius}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
style={uvHandleStyle}
@@ -566,7 +566,7 @@ const SelectedUvEllipseResizeHandle: React.FC<{
cx={resizeControl.position.x}
cy={resizeControl.position.y}
r={ellipseControlRadius}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
style={uvHandleStyle}
@@ -804,7 +804,7 @@ const SelectedUvEllipseRotationHandle: React.FC<{
cx={rotationControl.position.x}
cy={rotationControl.position.y}
r={ellipseControlRadius}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
style={uvHandleStyle}
@@ -1011,7 +1011,7 @@ const SelectedUvHandleCircle: React.FC<{
cx={position.x}
cy={position.y}
r={handle.isSelected ? selectedUvHandleRadius : uvHandleRadius}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
style={uvHandleStyle}
diff --git a/packages/studio/src/components/SidebarCollapserControls.tsx b/packages/studio/src/components/SidebarCollapserControls.tsx
index 5d9e06784f..4ee67df7f0 100644
--- a/packages/studio/src/components/SidebarCollapserControls.tsx
+++ b/packages/studio/src/components/SidebarCollapserControls.tsx
@@ -1,5 +1,10 @@
import React, {useCallback, useContext, useEffect} from 'react';
import {cmdOrCtrlCharacter} from '../error-overlay/remotion-overlay/ShortcutHint';
+import {
+ BORDER_CURRENT_COLOR,
+ CURRENT_COLOR,
+ TRANSPARENT,
+} from '../helpers/colors';
import {
areKeyboardShortcutsDisabled,
useKeybinding,
@@ -13,9 +18,9 @@ const style: React.CSSProperties = {
width: 16,
height: 16,
minWidth: 16,
- border: '1px solid currentColor',
+ border: BORDER_CURRENT_COLOR,
borderRadius: 3,
- color: 'currentColor',
+ color: CURRENT_COLOR,
position: 'relative',
};
@@ -31,7 +36,7 @@ export const SidebarCollapserControls: React.FC<{}> = () => {
width: '35%',
height: '100%',
borderRight: '1px solid ' + color,
- background: leftSidebarStatus === 'expanded' ? color : 'transparent',
+ background: leftSidebarStatus === 'expanded' ? color : TRANSPARENT,
};
},
[leftSidebarStatus],
@@ -46,7 +51,7 @@ export const SidebarCollapserControls: React.FC<{}> = () => {
position: 'absolute',
borderLeft: '1px solid ' + color,
background:
- sidebarCollapsedStateRight === 'expanded' ? color : 'transparent',
+ sidebarCollapsedStateRight === 'expanded' ? color : TRANSPARENT,
};
},
[sidebarCollapsedStateRight],
diff --git a/packages/studio/src/components/Splitter/SplitterElement.tsx b/packages/studio/src/components/Splitter/SplitterElement.tsx
index 8d1adcb834..86e91426a3 100644
--- a/packages/studio/src/components/Splitter/SplitterElement.tsx
+++ b/packages/studio/src/components/Splitter/SplitterElement.tsx
@@ -1,5 +1,6 @@
import React, {useContext, useMemo} from 'react';
import {interpolateColors, random} from 'remotion';
+import {RED} from '../../helpers/colors';
import {SplitterContext} from './SplitterContext';
export const SplitterElement: React.FC<{
@@ -31,7 +32,7 @@ export const SplitterElement: React.FC<{
backgroundColor: interpolateColors(
random(context.flexValue),
[0, 1],
- ['red', 'blue'],
+ [RED, 'blue'],
),
};
}, [context.flexValue, type]);
diff --git a/packages/studio/src/components/StaticFilePreview.tsx b/packages/studio/src/components/StaticFilePreview.tsx
index 399c5de80b..e429ffee04 100644
--- a/packages/studio/src/components/StaticFilePreview.tsx
+++ b/packages/studio/src/components/StaticFilePreview.tsx
@@ -1,7 +1,7 @@
import {useContext} from 'react';
import {staticFile} from 'remotion';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../helpers/colors';
import type {AssetMetadata} from '../helpers/get-asset-metadata';
import {getPreviewFileType} from '../helpers/get-preview-file-type';
import {FilePreview} from './FilePreview';
@@ -9,7 +9,7 @@ import {useStaticFiles} from './use-static-files';
const msgStyle: React.CSSProperties = {
fontSize: 13,
- color: 'white',
+ color: WHITE,
fontFamily: 'sans-serif',
display: 'flex',
justifyContent: 'center',
diff --git a/packages/studio/src/components/Tabs/index.tsx b/packages/studio/src/components/Tabs/index.tsx
index 64c01d48f3..bb07369619 100644
--- a/packages/studio/src/components/Tabs/index.tsx
+++ b/packages/studio/src/components/Tabs/index.tsx
@@ -2,9 +2,11 @@ import React, {useCallback, useMemo, useState} from 'react';
import {
BACKGROUND,
BLUE,
- CLEAR_HOVER,
+ BORDER_TRANSPARENT_2PX,
+ WHITE_ALPHA_06,
INPUT_BACKGROUND,
LIGHT_TEXT,
+ WHITE,
} from '../../helpers/colors';
import {useZIndex} from '../../state/z-index';
@@ -66,10 +68,10 @@ export const Tab: React.FC<{
backgroundColor: selected
? BACKGROUND
: hovered
- ? CLEAR_HOVER
+ ? WHITE_ALPHA_06
: INPUT_BACKGROUND,
- color: selected ? 'white' : LIGHT_TEXT,
- borderTop: selected ? '2px solid ' + BLUE : '2px solid transparent',
+ color: selected ? WHITE : LIGHT_TEXT,
+ borderTop: selected ? '2px solid ' + BLUE : BORDER_TRANSPARENT_2PX,
boxShadow: selected ? 'none' : undefined,
...style,
}),
diff --git a/packages/studio/src/components/Tabs/vertical.tsx b/packages/studio/src/components/Tabs/vertical.tsx
index cc654a6cd0..ad7b7ca02f 100644
--- a/packages/studio/src/components/Tabs/vertical.tsx
+++ b/packages/studio/src/components/Tabs/vertical.tsx
@@ -1,8 +1,10 @@
import React, {useCallback, useMemo, useState} from 'react';
import {
- CLEAR_HOVER,
+ WHITE_ALPHA_06,
LIGHT_TEXT,
SELECTED_BACKGROUND,
+ TRANSPARENT,
+ WHITE,
} from '../../helpers/colors';
import {useZIndex} from '../../state/z-index';
@@ -43,9 +45,9 @@ export const VerticalTab: React.FC<{
backgroundColor: selected
? SELECTED_BACKGROUND
: hovered
- ? CLEAR_HOVER
- : 'transparent',
- color: selected ? 'white' : LIGHT_TEXT,
+ ? WHITE_ALPHA_06
+ : TRANSPARENT,
+ color: selected ? WHITE : LIGHT_TEXT,
boxShadow: selected ? 'none' : undefined,
...style,
};
diff --git a/packages/studio/src/components/TextViewer.tsx b/packages/studio/src/components/TextViewer.tsx
index 536f0bfa97..acd68dffba 100644
--- a/packages/studio/src/components/TextViewer.tsx
+++ b/packages/studio/src/components/TextViewer.tsx
@@ -1,10 +1,11 @@
import {useEffect, useState} from 'react';
+import {WHITE} from '../helpers/colors';
const textStyle: React.CSSProperties = {
margin: 14,
fontFamily: 'monospace',
flex: 1,
- color: 'white',
+ color: WHITE,
whiteSpace: 'pre-wrap',
};
diff --git a/packages/studio/src/components/TimeValue.tsx b/packages/studio/src/components/TimeValue.tsx
index 866d224b3d..eff8458949 100644
--- a/packages/studio/src/components/TimeValue.tsx
+++ b/packages/studio/src/components/TimeValue.tsx
@@ -6,7 +6,7 @@ import React, {
useRef,
} from 'react';
import {Internals, useCurrentFrame} from 'remotion';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../helpers/colors';
import {useIsStill} from '../helpers/is-current-selected-still';
import {useKeybinding} from '../helpers/use-keybinding';
import {renderFrame} from '../state/render-frame';
@@ -14,7 +14,7 @@ import {Flex, Spacing} from './layout';
import {InputDragger} from './NewComposition/InputDragger';
const text: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
diff --git a/packages/studio/src/components/Timeline/EasingEditorModal.tsx b/packages/studio/src/components/Timeline/EasingEditorModal.tsx
index 90af095b04..4714ad421e 100644
--- a/packages/studio/src/components/Timeline/EasingEditorModal.tsx
+++ b/packages/studio/src/components/Timeline/EasingEditorModal.tsx
@@ -16,9 +16,14 @@ import {StudioServerConnectionCtx} from '../../helpers/client-id';
import {
BACKGROUND,
BLUE,
+ EASING_SELECTED_BACKGROUND,
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_HOVERED,
+ WHITE_ALPHA_05,
LIGHT_TEXT,
+ WHITE,
+ WHITE_ALPHA_12,
+ WHITE_ALPHA_35,
+ WHITE_ALPHA_72,
} from '../../helpers/colors';
import {Checkbox} from '../Checkbox';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
@@ -72,7 +77,7 @@ const DEFAULT_EASING_GRAPH_LABELS: EasingGraphLabels = {
start: '0',
end: '1',
};
-const EASING_GRAPH_GUIDE_COLOR = 'rgba(255, 255, 255, 0.12)';
+const EASING_GRAPH_GUIDE_COLOR = WHITE_ALPHA_12;
const EASING_GRAPH_LABEL_FONT_SIZE = 13;
const EASING_GRAPH_LABEL_HEIGHT = 20;
const EASING_GRAPH_LABEL_HORIZONTAL_PADDING = 4;
@@ -158,7 +163,7 @@ const inspectorPresetButtonsWrapper: React.CSSProperties = {
const presetButtonBase: React.CSSProperties = {
alignItems: 'center',
backgroundColor: INPUT_BACKGROUND,
- border: `1px solid ${INPUT_BORDER_COLOR_HOVERED}`,
+ border: `1px solid ${WHITE_ALPHA_05}`,
borderRadius: 4,
display: 'inline-flex',
height: 34,
@@ -185,7 +190,7 @@ const coordinateRow: React.CSSProperties = {
const coordinateLabel: React.CSSProperties = {
fontSize: 13,
- color: 'rgba(255, 255, 255, 0.72)',
+ color: WHITE_ALPHA_72,
paddingLeft: 6,
};
@@ -635,8 +640,8 @@ const EasingPresetButton: React.FC<{
const style = useMemo(
(): React.CSSProperties => ({
...presetButtonBase,
- backgroundColor: selected ? 'rgba(11, 132, 243, 0.18)' : INPUT_BACKGROUND,
- borderColor: selected ? BLUE : INPUT_BORDER_COLOR_HOVERED,
+ backgroundColor: selected ? EASING_SELECTED_BACKGROUND : INPUT_BACKGROUND,
+ borderColor: selected ? BLUE : WHITE_ALPHA_05,
cursor: disabled ? 'not-allowed' : 'pointer',
opacity: disabled ? 0.45 : 1,
}),
@@ -666,7 +671,7 @@ const EasingPresetButton: React.FC<{
<path
d={path}
fill="none"
- stroke="white"
+ stroke={WHITE}
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round"
@@ -1181,7 +1186,7 @@ export const EasingEditor: React.FC<{
y1={startPoint.y}
x2={firstHandle.x}
y2={firstHandle.y}
- stroke="rgba(255, 255, 255, 0.35)"
+ stroke={WHITE_ALPHA_35}
strokeWidth={1}
/>
<line
@@ -1189,17 +1194,17 @@ export const EasingEditor: React.FC<{
y1={endPoint.y}
x2={secondHandle.x}
y2={secondHandle.y}
- stroke="rgba(255, 255, 255, 0.35)"
+ stroke={WHITE_ALPHA_35}
strokeWidth={1}
/>
<path d={bezierPath} fill="none" stroke={BLUE} strokeWidth={3} />
- <circle cx={startPoint.x} cy={startPoint.y} r={4} fill="white" />
- <circle cx={endPoint.x} cy={endPoint.y} r={4} fill="white" />
+ <circle cx={startPoint.x} cy={startPoint.y} r={4} fill={WHITE} />
+ <circle cx={endPoint.x} cy={endPoint.y} r={4} fill={WHITE} />
<circle
cx={firstHandle.x}
cy={firstHandle.y}
r={6}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
vectorEffect="non-scaling-stroke"
@@ -1211,7 +1216,7 @@ export const EasingEditor: React.FC<{
cx={secondHandle.x}
cy={secondHandle.y}
r={6}
- fill="white"
+ fill={WHITE}
stroke={BLUE}
strokeWidth={2}
vectorEffect="non-scaling-stroke"
@@ -1327,8 +1332,8 @@ export const EasingEditor: React.FC<{
>
<EasingGraphScaffold labels={graphLabels} />
<path d={springPath} fill="none" stroke={BLUE} strokeWidth={3} />
- <circle cx={xToSvg(0)} cy={yToSvg(0)} r={4} fill="white" />
- <circle cx={xToSvg(1)} cy={yToSvg(1)} r={4} fill="white" />
+ <circle cx={xToSvg(0)} cy={yToSvg(0)} r={4} fill={WHITE} />
+ <circle cx={xToSvg(1)} cy={yToSvg(1)} r={4} fill={WHITE} />
</svg>
{modeSwitcher}
<div style={coordinatesGrid}>
diff --git a/packages/studio/src/components/Timeline/KeyframeSettingsModal.tsx b/packages/studio/src/components/Timeline/KeyframeSettingsModal.tsx
index 0828c3eb81..2c7c1b3331 100644
--- a/packages/studio/src/components/Timeline/KeyframeSettingsModal.tsx
+++ b/packages/studio/src/components/Timeline/KeyframeSettingsModal.tsx
@@ -8,7 +8,7 @@ import type {
} from 'remotion';
import {Internals} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {INPUT_BACKGROUND} from '../../helpers/colors';
+import {INPUT_BACKGROUND, WHITE_ALPHA_60} from '../../helpers/colors';
import {ModalsContext} from '../../state/modals';
import {Button} from '../Button';
import {Row, Spacing} from '../layout';
@@ -40,7 +40,7 @@ const label: React.CSSProperties = {
};
const helperText: React.CSSProperties = {
- color: 'rgba(255, 255, 255, 0.6)',
+ color: WHITE_ALPHA_60,
fontSize: 12,
lineHeight: 1.4,
marginTop: 4,
diff --git a/packages/studio/src/components/Timeline/LoopedIndicator.tsx b/packages/studio/src/components/Timeline/LoopedIndicator.tsx
index ba8cf58c4c..a3941c512e 100644
--- a/packages/studio/src/components/Timeline/LoopedIndicator.tsx
+++ b/packages/studio/src/components/Timeline/LoopedIndicator.tsx
@@ -1,6 +1,10 @@
import React from 'react';
import {AbsoluteFill} from 'remotion';
-import {LIGHT_COLOR} from '../../helpers/colors';
+import {
+ LIGHT_COLOR,
+ LOOPED_INDICATOR_DROP_SHADOW,
+ TRANSPARENT,
+} from '../../helpers/colors';
const width: React.CSSProperties = {
width: 0,
@@ -11,8 +15,7 @@ const width: React.CSSProperties = {
const icon: React.CSSProperties = {
height: 12,
- filter:
- 'drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8))',
+ filter: LOOPED_INDICATOR_DROP_SHADOW,
};
const Icon: React.FC = () => (
@@ -27,7 +30,7 @@ const Icon: React.FC = () => (
const verticalLine: React.CSSProperties = {
height: '100%',
width: 1,
- background: 'rgb(255,255,255, 0.5)',
+ background: TRANSPARENT,
};
const centerContainer: React.CSSProperties = {
diff --git a/packages/studio/src/components/Timeline/MaxTimelineTracks.tsx b/packages/studio/src/components/Timeline/MaxTimelineTracks.tsx
index f7950dcf20..dce3add5a3 100644
--- a/packages/studio/src/components/Timeline/MaxTimelineTracks.tsx
+++ b/packages/studio/src/components/Timeline/MaxTimelineTracks.tsx
@@ -1,5 +1,6 @@
import {DEFAULT_TIMELINE_TRACKS} from '@remotion/studio-shared';
import React from 'react';
+import {WHITE_ALPHA_10, WHITE_ALPHA_60} from '../../helpers/colors';
import {TIMELINE_PADDING} from '../../helpers/timeline-layout';
export const MAX_TIMELINE_TRACKS =
@@ -14,10 +15,10 @@ const container: React.CSSProperties = {
height: MAX_TIMELINE_TRACKS_NOTICE_HEIGHT,
display: 'flex',
alignItems: 'center',
- color: 'rgba(255, 255, 255, 0.6)',
+ color: WHITE_ALPHA_60,
fontFamily: 'sans-serif',
fontSize: 12,
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
+ backgroundColor: WHITE_ALPHA_10,
paddingLeft: TIMELINE_PADDING + 5,
};
diff --git a/packages/studio/src/components/Timeline/TimelineArrayField.tsx b/packages/studio/src/components/Timeline/TimelineArrayField.tsx
index 7319dfbdca..f1fa00333f 100644
--- a/packages/studio/src/components/Timeline/TimelineArrayField.tsx
+++ b/packages/studio/src/components/Timeline/TimelineArrayField.tsx
@@ -3,6 +3,13 @@ import type {
ArrayFieldSchema,
CanUpdateSequencePropStatusStatic,
} from 'remotion';
+import {
+ BLACK_FULL_HEX,
+ BORDER_WHITE_ALPHA_12,
+ WHITE,
+ WHITE_ALPHA_08,
+ WHITE_ALPHA_45,
+} from '../../helpers/colors';
import type {
SchemaFieldInfo,
TimelineFieldOnDragValueChange,
@@ -30,7 +37,7 @@ const itemContainer: React.CSSProperties = {
};
const itemLabel: React.CSSProperties = {
- color: 'rgba(255, 255, 255, 0.45)',
+ color: WHITE_ALPHA_45,
fontSize: 11,
fontVariantNumeric: 'tabular-nums',
width: 18,
@@ -38,10 +45,10 @@ const itemLabel: React.CSSProperties = {
};
const button: React.CSSProperties = {
- background: 'rgba(255, 255, 255, 0.08)',
- border: '1px solid rgba(255, 255, 255, 0.12)',
+ background: WHITE_ALPHA_08,
+ border: BORDER_WHITE_ALPHA_12,
borderRadius: 3,
- color: 'white',
+ color: WHITE,
cursor: 'pointer',
fontSize: 10,
height: 18,
@@ -86,7 +93,7 @@ const getFallbackItemValue = (field: ArrayFieldSchema): unknown => {
}
if (field.item.type === 'color') {
- return '#000000';
+ return BLACK_FULL_HEX;
}
if (field.item.type === 'enum') {
diff --git a/packages/studio/src/components/Timeline/TimelineColorField.tsx b/packages/studio/src/components/Timeline/TimelineColorField.tsx
index e1def702f0..1b7e8a8526 100644
--- a/packages/studio/src/components/Timeline/TimelineColorField.tsx
+++ b/packages/studio/src/components/Timeline/TimelineColorField.tsx
@@ -1,5 +1,6 @@
import React, {useCallback, useMemo} from 'react';
import type {CanUpdateSequencePropStatusStatic} from 'remotion';
+import {BLACK_HEX} from '../../helpers/colors';
import type {
SchemaFieldInfo,
TimelineFieldOnDragValueChange,
@@ -35,7 +36,7 @@ export const TimelineColorField: React.FC<{
typeof effectiveValue === 'string'
? effectiveValue
: field.fieldSchema.type === 'color'
- ? (field.fieldSchema.default ?? '#000')
+ ? (field.fieldSchema.default ?? BLACK_HEX)
: '';
const onChange = useCallback(
diff --git a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
index 38f6ad96a0..909ef28c7f 100644
--- a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
@@ -3,6 +3,7 @@ import type {SequencePropsSubscriptionKey, InteractivitySchema} from 'remotion';
import {Internals} from 'remotion';
import type {CodePosition} from '../../error-overlay/react-overlay/utils/get-source-map';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
+import {TIMELINE_BLUE, WHITE_ALPHA_80} from '../../helpers/colors';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {
EXPANDED_SECTION_PADDING_RIGHT,
@@ -36,7 +37,7 @@ let currentEffectDrag: EffectReorderDragData | null = null;
const rowLabel: React.CSSProperties = {
fontSize: 12,
- color: 'rgba(255, 255, 255, 0.8)',
+ color: WHITE_ALPHA_80,
userSelect: 'none',
};
@@ -50,7 +51,7 @@ const reorderWrapper: React.CSSProperties = {
};
const reorderLineBase: React.CSSProperties = {
- backgroundColor: '#0b84ff',
+ backgroundColor: TIMELINE_BLUE,
height: 2,
left: 0,
pointerEvents: 'none',
diff --git a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
index f862609766..a664c33706 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
@@ -1,9 +1,10 @@
import React, {useMemo} from 'react';
+import {LIGHT_GRAY, WHITE} from '../../helpers/colors';
const arrowButton: React.CSSProperties = {
background: 'none',
border: 'none',
- color: 'white',
+ color: WHITE,
cursor: 'pointer',
padding: 0,
display: 'flex',
@@ -72,7 +73,7 @@ export const TimelineExpandArrowButton: React.FC<{
aria-label={`${isExpanded ? 'Collapse' : 'Expand'} ${label}`}
>
<svg width="12" height="12" viewBox="0 0 8 8" style={svgStyle}>
- <path d="M2 1L6 4L2 7Z" fill="#ccc" />
+ <path d="M2 1L6 4L2 7Z" fill={LIGHT_GRAY} />
</svg>
</button>
);
diff --git a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
index d847a148c5..5710dda8f1 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import type {SequencePropsSubscriptionKey, InteractivitySchema} from 'remotion';
import type {CodePosition} from '../../error-overlay/react-overlay/utils/get-source-map';
+import {WHITE_ALPHA_80} from '../../helpers/colors';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import type {TimelineTreeNode} from '../../helpers/timeline-layout';
import {
@@ -28,7 +29,7 @@ import {TimelineSequencePropItem} from './TimelineSequencePropItem';
const rowLabel: React.CSSProperties = {
fontSize: 12,
- color: 'rgba(255, 255, 255, 0.8)',
+ color: WHITE_ALPHA_80,
userSelect: 'none',
};
diff --git a/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx b/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx
index c0f537647d..5b461cebd2 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx
@@ -1,7 +1,7 @@
import React, {useMemo} from 'react';
import type {TSequence} from 'remotion';
import type {CodePosition} from '../../error-overlay/react-overlay/utils/get-source-map';
-import {TIMELINE_TRACK_SEPARATOR} from '../../helpers/colors';
+import {TIMELINE_TRACK_SEPARATOR, WHITE} from '../../helpers/colors';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {
flattenVisibleTreeNodes,
@@ -11,7 +11,7 @@ import {TimelineExpandedRow} from './TimelineExpandedRow';
import {useTimelineExpandedTree} from './use-timeline-expanded-tree';
const expandedSectionBase: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
fontFamily: 'Arial, Helvetica, sans-serif',
fontSize: 12,
display: 'flex',
diff --git a/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx b/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
index aaab031969..5fece994f7 100644
--- a/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
+++ b/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
@@ -1,4 +1,5 @@
import React, {useMemo} from 'react';
+import {WHITE_ALPHA_80} from '../../helpers/colors';
import {getTimelineFieldLabelRowStyle} from './timeline-field-row-layout';
import {
getTimelineColor,
@@ -7,7 +8,7 @@ import {
const fieldNameBase: React.CSSProperties = {
fontSize: 12,
- color: 'rgba(255, 255, 255, 0.8)',
+ color: WHITE_ALPHA_80,
userSelect: 'none',
whiteSpace: 'nowrap',
overflow: 'hidden',
diff --git a/packages/studio/src/components/Timeline/TimelineImageInfo.tsx b/packages/studio/src/components/Timeline/TimelineImageInfo.tsx
index 59b82ee369..0e913bd72a 100644
--- a/packages/studio/src/components/Timeline/TimelineImageInfo.tsx
+++ b/packages/studio/src/components/Timeline/TimelineImageInfo.tsx
@@ -1,5 +1,6 @@
import {drawRepeatingImageThumbnail} from '@remotion/timeline-utils';
import React, {useEffect, useRef} from 'react';
+import {BLACK_ALPHA_30} from '../../helpers/colors';
import {getTimelineLayerHeight} from '../../helpers/timeline-layout';
const HEIGHT = getTimelineLayerHeight('image') - 2;
@@ -7,7 +8,7 @@ const HEIGHT = getTimelineLayerHeight('image') - 2;
const containerStyle: React.CSSProperties = {
height: HEIGHT,
width: '100%',
- backgroundColor: 'rgba(0, 0, 0, 0.3)',
+ backgroundColor: BLACK_ALPHA_30,
display: 'flex',
borderTopLeftRadius: 2,
borderBottomLeftRadius: 2,
diff --git a/packages/studio/src/components/Timeline/TimelineInOutPointer.tsx b/packages/studio/src/components/Timeline/TimelineInOutPointer.tsx
index 7a891cd34f..ce5631c167 100644
--- a/packages/studio/src/components/Timeline/TimelineInOutPointer.tsx
+++ b/packages/studio/src/components/Timeline/TimelineInOutPointer.tsx
@@ -1,12 +1,13 @@
import React, {createRef, useContext} from 'react';
import {Internals} from 'remotion';
+import {BLACK_ALPHA_50} from '../../helpers/colors';
import {getXPositionOfItemInTimelineImperatively} from '../../helpers/get-left-of-timeline-slider';
import {useTimelineInOutFramePosition} from '../../state/in-out';
import {TimelineWidthContext} from './TimelineWidthProvider';
const areaHighlight: React.CSSProperties = {
position: 'absolute',
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
+ backgroundColor: BLACK_ALPHA_50,
height: '100%',
bottom: 0,
top: 0,
diff --git a/packages/studio/src/components/Timeline/TimelineInOutPointerHandle.tsx b/packages/studio/src/components/Timeline/TimelineInOutPointerHandle.tsx
index 176b0b5504..c77eb113d9 100644
--- a/packages/studio/src/components/Timeline/TimelineInOutPointerHandle.tsx
+++ b/packages/studio/src/components/Timeline/TimelineInOutPointerHandle.tsx
@@ -1,6 +1,6 @@
import React, {createRef, useContext, useMemo} from 'react';
import {useVideoConfig} from 'remotion';
-import {LIGHT_TRANSPARENT} from '../../helpers/colors';
+import {WHITE_ALPHA_70, WHITE_ALPHA_10} from '../../helpers/colors';
import {getXPositionOfItemInTimelineImperatively} from '../../helpers/get-left-of-timeline-slider';
import {TIMELINE_SCRUBBER_ATTR} from './TimelineSelection';
import {TimelineWidthContext} from './TimelineWidthProvider';
@@ -9,7 +9,7 @@ const line: React.CSSProperties = {
height: '100%',
width: 1,
position: 'absolute',
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
+ backgroundColor: WHITE_ALPHA_10,
cursor: 'ew-resize',
paddingLeft: 1,
paddingRight: 1,
@@ -35,9 +35,7 @@ const InnerTimelineInOutPointerHandle: React.FC<
const style: React.CSSProperties = useMemo(() => {
return {
...line,
- backgroundColor: dragging
- ? LIGHT_TRANSPARENT
- : 'rgba(255, 255, 255, 0.1)',
+ backgroundColor: dragging ? WHITE_ALPHA_70 : WHITE_ALPHA_10,
transform: `translateX(${getXPositionOfItemInTimelineImperatively(
atFrame,
videoConfig.durationInFrames,
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
index 98ada9fd8f..7703716ad1 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
@@ -12,7 +12,7 @@ import type {
} from 'remotion';
import {Internals, useVideoConfig} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BLUE, LIGHT_TEXT} from '../../helpers/colors';
+import {BLUE, LIGHT_GRAY, LIGHT_TEXT, WHITE} from '../../helpers/colors';
import type {
SequenceNodePathInfo,
TrackWithHash,
@@ -61,7 +61,7 @@ const navButtonStyle: React.CSSProperties = {
alignItems: 'center',
background: 'none',
border: 'none',
- color: 'white',
+ color: WHITE,
cursor: 'pointer',
display: 'flex',
flexShrink: 0,
@@ -788,7 +788,7 @@ export const TimelineKeyframeControls: React.FC<{
title="Previous keyframe"
>
<svg width="14" height="14" viewBox="0 0 10 10" style={svgStyle}>
- <path d="M7 1.5L3 5L7 8.5Z" fill="#ccc" />
+ <path d="M7 1.5L3 5L7 8.5Z" fill={LIGHT_GRAY} />
</svg>
</button>
<button
@@ -814,7 +814,7 @@ export const TimelineKeyframeControls: React.FC<{
title="Next keyframe"
>
<svg width="14" height="14" viewBox="0 0 10 10" style={svgStyle}>
- <path d="M3 1.5L7 5L3 8.5Z" fill="#ccc" />
+ <path d="M3 1.5L7 5L3 8.5Z" fill={LIGHT_GRAY} />
</svg>
</button>
</div>
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeDiamondIcon.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
index 956f1c8ae2..d4a1b56e13 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {BLUE} from '../../helpers/colors';
+import {BLACK_ALPHA_40, BLUE} from '../../helpers/colors';
const svgStyle: React.CSSProperties = {
display: 'block',
@@ -32,7 +32,7 @@ export const TimelineKeyframeDiamondIcon: React.FC<{
<polygon
points="6 1.5 10.5 6 6 10.5 1.5 6"
fill={color}
- stroke="rgba(0, 0, 0, 0.4)"
+ stroke={BLACK_ALPHA_40}
strokeWidth="1"
strokeLinejoin="round"
/>
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeEasingLine.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeEasingLine.tsx
index 6bfb42f684..389776dd7c 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeEasingLine.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeEasingLine.tsx
@@ -5,7 +5,7 @@ import {
import React, {useCallback, useContext, useMemo, useRef} from 'react';
import {Internals, useVideoConfig} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BLUE} from '../../helpers/colors';
+import {BLUE, WHITE_ALPHA_10} from '../../helpers/colors';
import {getXPositionOfItemInTimelineImperatively} from '../../helpers/get-left-of-timeline-slider';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {TIMELINE_PADDING} from '../../helpers/timeline-layout';
@@ -38,7 +38,7 @@ const easingLineButton: React.CSSProperties = {
};
const easingLine: React.CSSProperties = {
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
+ backgroundColor: WHITE_ALPHA_10,
borderRadius: lineHeight / 2,
height: lineHeight,
left: 0,
diff --git a/packages/studio/src/components/Timeline/TimelineLayerEye.tsx b/packages/studio/src/components/Timeline/TimelineLayerEye.tsx
index 8036062d59..44d4f5b9ca 100644
--- a/packages/studio/src/components/Timeline/TimelineLayerEye.tsx
+++ b/packages/studio/src/components/Timeline/TimelineLayerEye.tsx
@@ -1,10 +1,15 @@
import React, {useCallback} from 'react';
-import {LIGHT_COLOR} from '../../helpers/colors';
+import {
+ BLACK_ALPHA_40,
+ CURRENT_COLOR,
+ LIGHT_COLOR,
+ WHITE,
+} from '../../helpers/colors';
import type {RenderInlineAction} from '../InlineAction';
const eyeIcon: React.CSSProperties = {
width: 12,
- color: 'currentColor',
+ color: CURRENT_COLOR,
pointerEvents: 'none',
};
@@ -23,7 +28,7 @@ export const timelineLayerIconContainer: React.CSSProperties = {
height: 16,
width: 16,
borderRadius: 2,
- backgroundColor: 'rgba(0, 0, 0, 0.4)',
+ backgroundColor: BLACK_ALPHA_40,
display: 'inline-flex',
justifyContent: 'center',
alignItems: 'center',
@@ -60,7 +65,7 @@ export const TimelineLayerEye: React.FC<{
<svg viewBox="0 0 16 16" fill="none" style={effectIcon}>
<path
d="M4.405 4.48C4.575 3.82 4.865 3.325 5.275 2.995C5.695 2.665 6.25 2.5 6.94 2.5H9.235V4.06H7.045C6.555 4.06 6.235 4.3 6.085 4.78L5.83 5.68H7.975V7.255H5.395L3.805 13H2.02L3.625 7.255H1.96V5.68H4.075L4.405 4.48ZM8.57102 9.085L6.87602 5.68H8.79602L9.86102 7.99L11.991 5.68H14.331L10.686 9.415L12.426 13H10.491L9.35102 10.585L7.02602 13H4.68602L8.57102 9.085Z"
- fill="white"
+ fill={WHITE}
/>
</svg>
);
diff --git a/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx b/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
index 437964b870..dee8068adb 100644
--- a/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
+++ b/packages/studio/src/components/Timeline/TimelineMediaInfo.tsx
@@ -1,6 +1,6 @@
import React, {useMemo} from 'react';
import {Internals} from 'remotion';
-import {VERY_LIGHT_TEXT} from '../../helpers/colors';
+import {WHITE_ALPHA_30} from '../../helpers/colors';
import {getTimelineAssetLinkInfo} from './timeline-asset-link';
const lineStyle: React.CSSProperties = {
@@ -9,7 +9,7 @@ const lineStyle: React.CSSProperties = {
textOverflow: 'ellipsis',
minWidth: 0,
fontSize: 12,
- color: VERY_LIGHT_TEXT,
+ color: WHITE_ALPHA_30,
display: 'inline-block',
};
@@ -19,7 +19,7 @@ const useAssetLink = (src: string) => {
const fileNameStyle: React.CSSProperties = useMemo(
() => ({
...lineStyle,
- color: VERY_LIGHT_TEXT,
+ color: WHITE_ALPHA_30,
textDecoration: 'none',
display: 'inline-block',
overflow: 'hidden',
diff --git a/packages/studio/src/components/Timeline/TimelineScaleField.tsx b/packages/studio/src/components/Timeline/TimelineScaleField.tsx
index 72268bc7e0..3beca38734 100644
--- a/packages/studio/src/components/Timeline/TimelineScaleField.tsx
+++ b/packages/studio/src/components/Timeline/TimelineScaleField.tsx
@@ -4,7 +4,7 @@ import type {
SequencePropsSubscriptionKey,
} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
-import {LIGHT_COLOR} from '../../helpers/colors';
+import {CURRENT_COLOR_LOWERCASE, LIGHT_COLOR} from '../../helpers/colors';
import type {
SchemaFieldInfo,
TimelineFieldOnDragValueChange,
@@ -132,7 +132,7 @@ const LinkToggle: React.FC<{
style={linkIconStyle}
>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M32 320C32 214 118 128 224 128L288 128L288 192L224 192C153.3 192 96 249.3 96 320C96 390.7 153.3 448 224 448L288 448L288 512L224 512C118 512 32 426 32 320zM608 320C608 426 522 512 416 512L352 512L352 448L416 448C486.7 448 544 390.7 544 320C544 249.3 486.7 192 416 192L352 192L352 128L416 128C522 128 608 214 608 320zM224 288L448 288L448 352L192 352L192 288L224 288z"
/>
</svg>
diff --git a/packages/studio/src/components/Timeline/TimelineSchemaField.tsx b/packages/studio/src/components/Timeline/TimelineSchemaField.tsx
index 735c742784..72e698e0ee 100644
--- a/packages/studio/src/components/Timeline/TimelineSchemaField.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSchemaField.tsx
@@ -4,7 +4,7 @@ import type {
CanUpdateSequencePropStatusStatic,
SequencePropsSubscriptionKey,
} from 'remotion';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE_ALPHA_40} from '../../helpers/colors';
import type {
SchemaFieldInfo,
TimelineFieldOnDragValueChange,
@@ -33,7 +33,7 @@ const unsupportedStatusWrapper: React.CSSProperties = {
};
const unsupportedLabel: React.CSSProperties = {
- color: 'rgba(255, 255, 255, 0.4)',
+ color: WHITE_ALPHA_40,
fontSize: 12,
fontStyle: 'italic',
};
diff --git a/packages/studio/src/components/Timeline/TimelineScrollable.tsx b/packages/studio/src/components/Timeline/TimelineScrollable.tsx
index 92b742ea28..33962af2bb 100644
--- a/packages/studio/src/components/Timeline/TimelineScrollable.tsx
+++ b/packages/studio/src/components/Timeline/TimelineScrollable.tsx
@@ -1,4 +1,8 @@
import React, {useMemo} from 'react';
+import {
+ BORDER_TIMELINE_MARQUEE_BLUE,
+ TIMELINE_MARQUEE_BLUE_ALPHA_16,
+} from '../../helpers/colors';
import {HORIZONTAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
import {scrollableRef} from './timeline-refs';
import {
@@ -16,8 +20,8 @@ const outer: React.CSSProperties = {
};
const marqueeStyle: React.CSSProperties = {
- backgroundColor: 'rgba(70, 130, 255, 0.16)',
- border: '1px solid rgba(70, 130, 255, 0.75)',
+ backgroundColor: TIMELINE_MARQUEE_BLUE_ALPHA_16,
+ border: BORDER_TIMELINE_MARQUEE_BLUE,
boxSizing: 'border-box',
pointerEvents: 'none',
position: 'fixed',
diff --git a/packages/studio/src/components/Timeline/TimelineSelection.tsx b/packages/studio/src/components/Timeline/TimelineSelection.tsx
index 811c4b4beb..6b44793c0f 100644
--- a/packages/studio/src/components/Timeline/TimelineSelection.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSelection.tsx
@@ -16,7 +16,15 @@ import {
type PropStatuses,
} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BACKGROUND} from '../../helpers/colors';
+import {
+ BACKGROUND,
+ BLACK,
+ TIMELINE_BACKGROUND_COLOR,
+ TIMELINE_SELECTED_BACKGROUND_COLOR,
+ TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR,
+ WHITE_ALPHA_10,
+ WHITE_ALPHA_80,
+} from '../../helpers/colors';
import type {
SequenceNodePathInfo,
TrackWithHash,
@@ -46,9 +54,10 @@ import {timelineVerticalScroll} from './timeline-refs';
import {TimelineClipboardKeybindings} from './TimelineClipboardKeybindings';
import {TimelineDeleteKeybindings} from './TimelineDeleteKeybindings';
-export const TIMELINE_SELECTED_BACKGROUND = '#3B3F42';
-export const TIMELINE_SELECTED_LABEL_BACKGROUND = '#B0B0B0';
-export const TIMELINE_SELECTED_LABEL_TEXT = 'black';
+export const TIMELINE_SELECTED_BACKGROUND = TIMELINE_SELECTED_BACKGROUND_COLOR;
+export const TIMELINE_SELECTED_LABEL_BACKGROUND =
+ TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR;
+export const TIMELINE_SELECTED_LABEL_TEXT = BLACK;
export const TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
export const getTimelineSelectedLabelStyle = (
@@ -61,7 +70,7 @@ export const getTimelineSelectedLabelStyle = (
...(selected
? {
backgroundColor: subcategory
- ? 'rgba(255, 255, 255, 0.1)'
+ ? WHITE_ALPHA_10
: TIMELINE_SELECTED_LABEL_BACKGROUND,
}
: {}),
@@ -71,7 +80,7 @@ export const getTimelineSelectedLabelStyle = (
export const getTimelineColor = (selected: boolean, subcategory: boolean) => {
return selected && !subcategory
? TIMELINE_SELECTED_LABEL_TEXT
- : 'rgba(255, 255, 255, 0.8)';
+ : WHITE_ALPHA_80;
};
export const getTimelineSelectedTrackHighlightStyle = (
@@ -101,7 +110,7 @@ export const getTimelineRowHighlightBackground = ({
: undefined;
};
-export const TIMELINE_BACKGROUND = '#0F1113';
+export const TIMELINE_BACKGROUND = TIMELINE_BACKGROUND_COLOR;
export const TIMELINE_TICKS_BACKGROUND = BACKGROUND;
export type TimelineSelection =
diff --git a/packages/studio/src/components/Timeline/TimelineSequence.tsx b/packages/studio/src/components/Timeline/TimelineSequence.tsx
index 02f5af43e7..126a078fa5 100644
--- a/packages/studio/src/components/Timeline/TimelineSequence.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequence.tsx
@@ -2,7 +2,16 @@ import React, {useCallback, useContext, useMemo, useRef} from 'react';
import type {TSequence} from 'remotion';
import {Internals, useCurrentFrame} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
-import {BLUE} from '../../helpers/colors';
+import {
+ BLUE,
+ TIMELINE_AUDIO_GRADIENT,
+ TIMELINE_IMAGE_GRADIENT,
+ TIMELINE_VIDEO_GRADIENT,
+ TRANSPARENT,
+ WHITE,
+ WHITE_ALPHA_20,
+ WHITE_ALPHA_50,
+} from '../../helpers/colors';
import {formatFileLocation} from '../../helpers/format-file-location';
import {
getTimelineSequenceLayout,
@@ -44,10 +53,6 @@ import {TimelineWidthContext} from './TimelineWidthProvider';
import {useResolveStackAndReactToChange} from './use-resolved-stack-react-to-change';
import {useSequenceFreezeFrameMenuItem} from './use-sequence-freeze-frame-menu-item';
-const AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
-const VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
-const IMAGE_GRADIENT = 'linear-gradient(to top, #2980b9, #3498db)';
-
const TimelineSequenceFn: React.FC<{
readonly s: TSequence;
readonly nodePathInfo: SequenceNodePathInfo | null;
@@ -166,12 +171,12 @@ const TimelineSequenceCurrentFrame: React.FC<{
width: premountWidth,
height: '100%',
background: `repeating-linear-gradient(
- -45deg,
- transparent,
- transparent 2px,
- rgba(255, 255, 255, ${isPremounting ? 0.5 : 0.2}) 2px,
- rgba(255, 255, 255, ${isPremounting ? 0.5 : 0.2}) 4px
- )`,
+ -45deg,
+ ${TRANSPARENT},
+ ${TRANSPARENT} 2px,
+ ${isPremounting ? WHITE_ALPHA_50 : WHITE_ALPHA_20} 2px,
+ ${isPremounting ? WHITE_ALPHA_50 : WHITE_ALPHA_20} 4px
+ )`,
position: 'absolute',
}}
/>
@@ -183,12 +188,12 @@ const TimelineSequenceCurrentFrame: React.FC<{
width: postmountWidth,
height: '100%',
background: `repeating-linear-gradient(
- -45deg,
- transparent,
- transparent 2px,
- rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 2px,
- rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 4px
- )`,
+ -45deg,
+ ${TRANSPARENT},
+ ${TRANSPARENT} 2px,
+ ${isPostmounting ? WHITE_ALPHA_50 : WHITE_ALPHA_20} 2px,
+ ${isPostmounting ? WHITE_ALPHA_50 : WHITE_ALPHA_20} 4px
+ )`,
position: 'absolute',
right: 0,
}}
@@ -487,19 +492,19 @@ const TimelineSequenceInner: React.FC<{
return {
background:
s.type === 'audio'
- ? AUDIO_GRADIENT
+ ? TIMELINE_AUDIO_GRADIENT
: s.type === 'video'
- ? VIDEO_GRADIENT
+ ? TIMELINE_VIDEO_GRADIENT
: s.type === 'image'
- ? IMAGE_GRADIENT
+ ? TIMELINE_IMAGE_GRADIENT
: BLUE,
- border: SEQUENCE_BORDER_WIDTH + 'px solid rgba(255, 255, 255, 0.2)',
+ border: `${SEQUENCE_BORDER_WIDTH}px solid ${WHITE_ALPHA_20}`,
borderRadius: 2,
position: 'absolute',
height: getTimelineLayerHeight(s.type),
marginLeft,
width,
- color: 'white',
+ color: WHITE,
overflow: 'hidden',
};
}, [marginLeft, s.type, width]);
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
index 7224ff2433..e94b90c3be 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {CURRENT_COLOR, WHITE} from '../../helpers/colors';
const relativeFrameStyle: React.CSSProperties = {
alignItems: 'center',
@@ -6,7 +7,7 @@ const relativeFrameStyle: React.CSSProperties = {
fontSize: 11,
fontFamily: 'Arial, Helvetica, sans-serif',
gap: 4,
- color: 'white',
+ color: WHITE,
opacity: 0.5,
whiteSpace: 'nowrap',
pointerEvents: 'none',
@@ -25,7 +26,7 @@ const FreezeFrameIcon: React.FC = () => {
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
style={snowflakeStyle}
- fill="currentColor"
+ fill={CURRENT_COLOR}
>
<path d="M288 32l0-32-64 0 0 88.4-64-64-39.6 39.6 103.6 103.6 0 56.4-56.4 0-103.6-103.6-39.6 39.6 64 64-88.4 0 0 64 88.4 0c-33.5 33.5-54.9 54.9-64 64L64 391.6c2.5-2.5 37.1-37.1 103.6-103.6l56.4 0 0 56.4C157.5 410.9 122.9 445.5 120.4 448L160 487.6c9.1-9.1 30.5-30.5 64-64l0 88.4 64 0 0-88.4 64 64 39.6-39.6-103.6-103.6 0-56.4 56.4 0 103.6 103.6 39.6-39.6-64-64 88.4 0 0-64-88.4 0c33.5-33.5 54.9-54.9 64-64L448 120.4c-2.5 2.5-37.1 37.1-103.6 103.6l-56.4 0 0-56.4C354.5 101.1 389.1 66.5 391.6 64L352 24.4c-9.1 9.1-30.5 30.5-64 64L288 32z" />
</svg>
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx b/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
index 0d213f18bc..fc0d7bd06b 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceItem.tsx
@@ -3,6 +3,14 @@ import React, {useCallback, useContext, useMemo, useState} from 'react';
import type {SequencePropsSubscriptionKey, TSequence} from 'remotion';
import {Internals} from 'remotion';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
+import {
+ BLACK_ALPHA_85,
+ BORDER_TIMELINE_DROP_BLUE,
+ BORDER_WHITE_ALPHA_20,
+ TIMELINE_BLUE,
+ TIMELINE_DROP_BLUE_ALPHA_16,
+ WHITE,
+} from '../../helpers/colors';
import {formatFileLocation} from '../../helpers/format-file-location';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {
@@ -62,8 +70,8 @@ const labelContainerStyle: React.CSSProperties = {
};
const effectDropHighlight: React.CSSProperties = {
- backgroundColor: 'rgba(0, 155, 255, 0.16)',
- outline: '1px solid rgba(0, 155, 255, 0.75)',
+ backgroundColor: TIMELINE_DROP_BLUE_ALPHA_16,
+ outline: BORDER_TIMELINE_DROP_BLUE,
outlineOffset: -1,
};
@@ -111,7 +119,7 @@ const sequenceReorderWrapper: React.CSSProperties = {
};
const sequenceReorderLineBase: React.CSSProperties = {
- backgroundColor: '#0b84ff',
+ backgroundColor: TIMELINE_BLUE,
height: 2,
left: 0,
pointerEvents: 'none',
@@ -121,10 +129,10 @@ const sequenceReorderLineBase: React.CSSProperties = {
};
const sequenceReorderRejectionStyle: React.CSSProperties = {
- backgroundColor: 'rgba(0, 0, 0, 0.85)',
- border: '1px solid rgba(255, 255, 255, 0.2)',
+ backgroundColor: BLACK_ALPHA_85,
+ border: BORDER_WHITE_ALPHA_20,
borderRadius: 4,
- color: 'white',
+ color: WHITE,
fontSize: 11,
lineHeight: 1.2,
maxWidth: 260,
@@ -677,7 +685,7 @@ export const TimelineSequenceItem: React.FC<{
const inner: React.CSSProperties = useMemo(() => {
return {
height: TIMELINE_LIST_ITEM_ROW_HEIGHT,
- color: 'white',
+ color: WHITE,
fontFamily: 'Arial, Helvetica, sans-serif',
wordBreak: 'break-all',
textAlign: 'left',
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceName.tsx b/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
index bbe3b4caf9..9fe76f03e8 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceName.tsx
@@ -1,4 +1,5 @@
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
+import {BLACK, TRANSPARENT, WHITE_ALPHA_72} from '../../helpers/colors';
import {
getTimelineColor,
getTimelineSelectedLabelStyle,
@@ -60,7 +61,7 @@ export const TimelineSequenceName: React.FC<{
const inputStyle = useMemo((): React.CSSProperties => {
return {
...style,
- background: 'transparent',
+ background: TRANSPARENT,
border: 0,
color: getTimelineColor(false, false),
fontFamily: 'inherit',
@@ -132,7 +133,7 @@ export const TimelineSequenceName: React.FC<{
return (
<>
<style>
- {`.${RENAME_INPUT_CLASS_NAME}::selection { background: rgba(255, 255, 255, 0.72); color: black; }`}
+ {`.${RENAME_INPUT_CLASS_NAME}::selection { background: ${WHITE_ALPHA_72}; color: ${BLACK}; }`}
</style>
<input
ref={inputRef}
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceRightEdgeDragHandle.tsx b/packages/studio/src/components/Timeline/TimelineSequenceRightEdgeDragHandle.tsx
index 9ff67c0a99..5484ed4d04 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceRightEdgeDragHandle.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceRightEdgeDragHandle.tsx
@@ -20,6 +20,7 @@ import {Internals} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
import {calculateTimeline} from '../../helpers/calculate-timeline';
import {StudioServerConnectionCtx} from '../../helpers/client-id';
+import {TRANSPARENT} from '../../helpers/colors';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
import {TIMELINE_PADDING} from '../../helpers/timeline-layout';
import {
@@ -833,7 +834,7 @@ export const TimelineSequenceLeftEdgeDragHandle: React.FC<{
const style: React.CSSProperties = {
...baseStyle,
left: 0,
- background: 'transparent',
+ background: TRANSPARENT,
};
return (
@@ -1312,7 +1313,7 @@ export const TimelineSequenceRightEdgeDragHandle: React.FC<{
const style: React.CSSProperties = {
...baseStyle,
right: 0,
- background: 'transparent',
+ background: TRANSPARENT,
};
return (
diff --git a/packages/studio/src/components/Timeline/TimelineSlider.tsx b/packages/studio/src/components/Timeline/TimelineSlider.tsx
index e2bb0f228c..2ce203afad 100644
--- a/packages/studio/src/components/Timeline/TimelineSlider.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSlider.tsx
@@ -7,6 +7,7 @@ import React, {
useRef,
} from 'react';
import {Internals, useVideoConfig} from 'remotion';
+import {TIMELINE_PLAYHEAD_COLOR} from '../../helpers/colors';
import {getXPositionOfItemInTimelineImperatively} from '../../helpers/get-left-of-timeline-slider';
import {TIMELINE_MIN_ZOOM, TimelineZoomCtx} from '../../state/timeline-zoom';
import {getCurrentDuration} from './imperative-state';
@@ -27,7 +28,7 @@ const line: React.CSSProperties = {
height: '100vh',
width: PLAYHEAD_LINE_WIDTH,
position: 'fixed',
- backgroundColor: '#f02c00',
+ backgroundColor: TIMELINE_PLAYHEAD_COLOR,
};
const PLAYHEAD_CENTER_OFFSET = PLAYHEAD_LINE_WIDTH / 2;
diff --git a/packages/studio/src/components/Timeline/TimelineSliderHandle.tsx b/packages/studio/src/components/Timeline/TimelineSliderHandle.tsx
index 1daf01842f..f744c83def 100644
--- a/packages/studio/src/components/Timeline/TimelineSliderHandle.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSliderHandle.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {TIMELINE_PLAYHEAD_COLOR} from '../../helpers/colors';
const container: React.CSSProperties = {
width: 20,
@@ -13,7 +14,7 @@ export const TimelineSliderHandle: React.FC = () => {
<svg width={17} viewBox="0 0 159 212">
<path
d="M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z"
- fill="#f02c00"
+ fill={TIMELINE_PLAYHEAD_COLOR}
/>
</svg>
</div>
diff --git a/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx b/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
index 781a0a7f4d..7d25fcced0 100644
--- a/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
+++ b/packages/studio/src/components/Timeline/TimelineTimeIndicators.tsx
@@ -4,6 +4,7 @@ import {
BACKGROUND,
LIGHT_TEXT,
TIMELINE_TRACK_SEPARATOR,
+ WHITE_ALPHA_15,
} from '../../helpers/colors';
import {
TIMELINE_ITEM_BORDER_BOTTOM,
@@ -28,7 +29,7 @@ const container: React.CSSProperties = {
const tick: React.CSSProperties = {
width: 1,
- backgroundColor: 'rgba(255, 255, 255, 0.15)',
+ backgroundColor: WHITE_ALPHA_15,
height: 20,
position: 'absolute',
};
diff --git a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
index f84a664459..31fedbea8a 100644
--- a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
+++ b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
@@ -18,6 +18,7 @@ import {
import React, {useEffect, useMemo, useRef, useState} from 'react';
import type {LoopDisplay} from 'remotion';
import {useVideoConfig} from 'remotion';
+import {BLACK_ALPHA_30} from '../../helpers/colors';
import {
TIMELINE_LAYER_FILMSTRIP_HEIGHT,
TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT,
@@ -35,7 +36,7 @@ const outerStyle: React.CSSProperties = {
const filmstripContainerStyle: React.CSSProperties = {
height: TIMELINE_LAYER_FILMSTRIP_HEIGHT,
- backgroundColor: 'rgba(0, 0, 0, 0.3)',
+ backgroundColor: BLACK_ALPHA_30,
display: 'flex',
borderTopLeftRadius: 2,
fontSize: 10,
diff --git a/packages/studio/src/components/Timeline/TimelineZoomControls.tsx b/packages/studio/src/components/Timeline/TimelineZoomControls.tsx
index 568a7c6241..11b7cede08 100644
--- a/packages/studio/src/components/Timeline/TimelineZoomControls.tsx
+++ b/packages/studio/src/components/Timeline/TimelineZoomControls.tsx
@@ -1,5 +1,6 @@
import React, {useCallback, useContext} from 'react';
import {Internals} from 'remotion';
+import {BLACK, CURRENT_COLOR_LOWERCASE, WHITE} from '../../helpers/colors';
import {useIsStill} from '../../helpers/is-current-selected-still';
import {Minus} from '../../icons/minus';
import {Plus} from '../../icons/plus';
@@ -13,7 +14,7 @@ import {ControlButton} from '../ControlButton';
import {Spacing} from '../layout';
const container: React.CSSProperties = {
- color: 'black',
+ color: BLACK,
flexDirection: 'row',
display: 'flex',
alignItems: 'center',
@@ -24,7 +25,7 @@ const buttonStyle: React.CSSProperties = {
};
const iconStyle: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
width: 14,
};
@@ -117,7 +118,7 @@ export const TimelineZoomControls: React.FC = () => {
type="button"
disabled={TIMELINE_MAX_ZOOM === zoom}
>
- <Plus color="currentcolor" style={iconStyle} />
+ <Plus color={CURRENT_COLOR_LOWERCASE} style={iconStyle} />
</ControlButton>
</div>
);
diff --git a/packages/studio/src/components/TimelineInOutToggle.tsx b/packages/studio/src/components/TimelineInOutToggle.tsx
index c8186806ed..f0540841b2 100644
--- a/packages/studio/src/components/TimelineInOutToggle.tsx
+++ b/packages/studio/src/components/TimelineInOutToggle.tsx
@@ -7,7 +7,7 @@ import React, {
} from 'react';
import {Internals} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
-import {BLUE} from '../helpers/colors';
+import {BLUE, WHITE} from '../helpers/colors';
import {
areKeyboardShortcutsDisabled,
useKeybinding,
@@ -305,7 +305,7 @@ export const TimelineInOutPointToggle: React.FC = () => {
disabled={!videoConfig || isFirstFrame}
>
<TimelineInPointer
- color={inFrame === null ? 'white' : BLUE}
+ color={inFrame === null ? WHITE : BLUE}
style={style}
/>
</ControlButton>
@@ -317,7 +317,7 @@ export const TimelineInOutPointToggle: React.FC = () => {
disabled={!videoConfig || isLastFrame}
>
<TimelineOutPointer
- color={outFrame === null ? 'white' : BLUE}
+ color={outFrame === null ? WHITE : BLUE}
style={style}
/>
</ControlButton>
diff --git a/packages/studio/src/components/UpdateCheck.tsx b/packages/studio/src/components/UpdateCheck.tsx
index 27f68cf833..81656cfbf0 100644
--- a/packages/studio/src/components/UpdateCheck.tsx
+++ b/packages/studio/src/components/UpdateCheck.tsx
@@ -7,7 +7,13 @@ import React, {
useState,
} from 'react';
import {VERSION} from 'remotion';
-import {BLUE, LIGHT_TEXT, WARNING_COLOR} from '../helpers/colors';
+import {
+ BLUE,
+ CURRENT_COLOR_LOWERCASE,
+ LIGHT_TEXT,
+ TRANSPARENT,
+ WARNING_COLOR,
+} from '../helpers/colors';
import {ModalsContext} from '../state/modals';
import {useZIndex} from '../state/z-index';
import {updateAvailable} from './RenderQueue/actions';
@@ -25,7 +31,7 @@ const buttonStyle: React.CSSProperties = {
color: BLUE,
border: 'none',
fontWeight: 'bold',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
cursor: 'pointer',
fontSize: 14,
display: 'inline-flex',
@@ -144,7 +150,7 @@ export const UpdateCheck = () => {
viewBox="0 0 512 512"
>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z"
/>
</svg>
diff --git a/packages/studio/src/components/UpdateModal/OpenIssueButton.tsx b/packages/studio/src/components/UpdateModal/OpenIssueButton.tsx
index 2b77671565..d8e717be76 100644
--- a/packages/studio/src/components/UpdateModal/OpenIssueButton.tsx
+++ b/packages/studio/src/components/UpdateModal/OpenIssueButton.tsx
@@ -1,5 +1,5 @@
import {useCallback, useMemo, useState} from 'react';
-import {LIGHT_TEXT} from '../../helpers/colors';
+import {LIGHT_TEXT, WHITE} from '../../helpers/colors';
const svgStyle: React.CSSProperties = {
width: '11px',
@@ -23,7 +23,7 @@ export const OpenIssueButton: React.FC<{link: string}> = ({link}) => {
}, [link]);
const svgFillColor = useMemo(() => {
- return hovered ? 'white' : LIGHT_TEXT;
+ return hovered ? WHITE : LIGHT_TEXT;
}, [hovered]);
const openInEditorSvg = (
diff --git a/packages/studio/src/components/VisualControls/ClickableFileName.tsx b/packages/studio/src/components/VisualControls/ClickableFileName.tsx
index 666068f6b9..06b6b404d2 100644
--- a/packages/studio/src/components/VisualControls/ClickableFileName.tsx
+++ b/packages/studio/src/components/VisualControls/ClickableFileName.tsx
@@ -1,6 +1,6 @@
import {useCallback, useMemo, useState} from 'react';
import type {OriginalPosition} from '../../error-overlay/react-overlay/utils/get-source-map';
-import {LIGHT_COLOR} from '../../helpers/colors';
+import {BORDER_WHITE, LIGHT_COLOR, WHITE_HEX} from '../../helpers/colors';
import {openOriginalPositionInEditor} from '../../helpers/open-in-editor';
import {SCHEMA_EDITOR_FIELDSET_PADDING} from '../RenderModal/SchemaEditor/Fieldset';
import {getOriginalSourceAttribution} from '../Timeline/TimelineStack/source-attribution';
@@ -43,8 +43,8 @@ export const ClickableFileName = ({
return {
fontSize: 12,
cursor: originalFileName.type === 'loaded' ? 'pointer' : undefined,
- borderBottom: hoverEffect ? '1px solid #fff' : 'none',
- color: hoverEffect ? '#fff' : LIGHT_COLOR,
+ borderBottom: hoverEffect ? BORDER_WHITE : 'none',
+ color: hoverEffect ? WHITE_HEX : LIGHT_COLOR,
};
}, [originalFileName, hoverEffect]);
diff --git a/packages/studio/src/components/selected-outline-measurement.ts b/packages/studio/src/components/selected-outline-measurement.ts
index 0c79acaf79..eeec393921 100644
--- a/packages/studio/src/components/selected-outline-measurement.ts
+++ b/packages/studio/src/components/selected-outline-measurement.ts
@@ -1,5 +1,6 @@
import type {OverrideIdToNodePaths, TSequence} from 'remotion';
import {calculateTimeline} from '../helpers/calculate-timeline';
+import {BLACK, WHITE} from '../helpers/colors';
import {getBoxQuadsPonyfill} from '../helpers/get-box-quads-ponyfill';
import type {OutlinePoint, SelectedOutline} from './selected-outline-geometry';
import {mixPoint} from './selected-outline-geometry';
@@ -89,7 +90,7 @@ export const getRotationCursor = (rotation: number): string => {
? ''
: `<g transform="rotate(${normalizedRotation} 32 32)">`;
const transformEnd = normalizedRotation === 0 ? '' : '</g>';
- const svg = `<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">${transform}<g transform="scale(0.876712329)" filter="url(#filter0_d_1_14)"><path d="M10.9111 17.7687C10.3413 18.3701 10.367 19.3195 10.9684 19.8893L20.7687 29.1738C21.3701 29.7436 22.3195 29.7179 22.8893 29.1165C23.459 28.5151 23.4334 27.5657 22.832 26.996L14.1206 18.7431L22.3735 10.0316C22.9432 9.43022 22.9176 8.48082 22.3162 7.91107C21.7148 7.34133 20.7654 7.36699 20.1956 7.96839L10.9111 17.7687ZM49.3923 58.3118C49.9509 58.9235 50.8996 58.9667 51.5114 58.4081L61.481 49.3055C62.0927 48.7469 62.1359 47.7981 61.5773 47.1863C61.0187 46.5745 60.0699 46.5314 59.4581 47.09L50.5963 55.1812L42.5051 46.3194C41.9465 45.7076 40.9977 45.6645 40.386 46.2231C39.7742 46.7817 39.7311 47.7304 40.2896 48.3422L49.3923 58.3118ZM12.6747 18.7431L13 19.8893C22.1283 19.6426 30.7584 21.4283 37.8564 26.6927C44.8518 31.8809 49.734 39.8538 49 56H50.5963H51.5114C52.2774 39.1461 47.6482 30.2198 39.6436 24.2831C31.7416 18.4224 22.3717 17.2467 13 17.5L12.6747 18.7431Z" fill="black"/><path d="M19.1064 6.93652C20.2459 5.73379 22.1448 5.68278 23.3477 6.82227C24.5505 7.96181 24.6022 9.86076 23.4629 11.0635L18.7373 16.0508C26.3487 16.4239 33.9128 18.1651 40.5371 23.0781C44.7339 26.1907 48.0794 30.1189 50.2568 35.4834C51.9666 39.6958 52.9327 44.7395 53.0742 50.8867L58.4463 45.9824C59.6697 44.8654 61.5673 44.9514 62.6846 46.1748C63.8018 47.3985 63.7155 49.296 62.4922 50.4131L52.5225 59.5156C51.337 60.5979 49.5196 60.5507 48.3916 59.4346L48.2842 59.3232L39.1816 49.3535C38.0648 48.1301 38.1507 46.2324 39.374 45.1152C40.5975 43.9979 42.4961 44.0841 43.6133 45.3076L47.4756 49.5381C47.1908 44.7613 46.2876 40.9448 44.9482 37.8291C43.0666 33.4521 40.2851 30.3614 36.9629 27.8975C31.8259 24.0875 25.8071 22.1663 19.2891 21.5732L23.8633 25.9072C25.0662 27.0468 25.1178 28.9457 23.9785 30.1484C22.8746 31.3135 21.0576 31.3982 19.8516 30.3662L19.7373 30.2627L9.93652 20.9785C8.73384 19.839 8.6828 17.9401 9.82227 16.7373L19.1064 6.93652Z" stroke="white" stroke-width="3"/></g>${transformEnd}<defs><filter id="filter0_d_1_14" x="0" y="0" width="72.4696" height="72.3004" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="3"/><feGaussianBlur stdDeviation="3.75"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_14"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_14" result="shape"/></filter></defs></svg>`;
+ const svg = `<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">${transform}<g transform="scale(0.876712329)" filter="url(#filter0_d_1_14)"><path d="M10.9111 17.7687C10.3413 18.3701 10.367 19.3195 10.9684 19.8893L20.7687 29.1738C21.3701 29.7436 22.3195 29.7179 22.8893 29.1165C23.459 28.5151 23.4334 27.5657 22.832 26.996L14.1206 18.7431L22.3735 10.0316C22.9432 9.43022 22.9176 8.48082 22.3162 7.91107C21.7148 7.34133 20.7654 7.36699 20.1956 7.96839L10.9111 17.7687ZM49.3923 58.3118C49.9509 58.9235 50.8996 58.9667 51.5114 58.4081L61.481 49.3055C62.0927 48.7469 62.1359 47.7981 61.5773 47.1863C61.0187 46.5745 60.0699 46.5314 59.4581 47.09L50.5963 55.1812L42.5051 46.3194C41.9465 45.7076 40.9977 45.6645 40.386 46.2231C39.7742 46.7817 39.7311 47.7304 40.2896 48.3422L49.3923 58.3118ZM12.6747 18.7431L13 19.8893C22.1283 19.6426 30.7584 21.4283 37.8564 26.6927C44.8518 31.8809 49.734 39.8538 49 56H50.5963H51.5114C52.2774 39.1461 47.6482 30.2198 39.6436 24.2831C31.7416 18.4224 22.3717 17.2467 13 17.5L12.6747 18.7431Z" fill="${BLACK}"/><path d="M19.1064 6.93652C20.2459 5.73379 22.1448 5.68278 23.3477 6.82227C24.5505 7.96181 24.6022 9.86076 23.4629 11.0635L18.7373 16.0508C26.3487 16.4239 33.9128 18.1651 40.5371 23.0781C44.7339 26.1907 48.0794 30.1189 50.2568 35.4834C51.9666 39.6958 52.9327 44.7395 53.0742 50.8867L58.4463 45.9824C59.6697 44.8654 61.5673 44.9514 62.6846 46.1748C63.8018 47.3985 63.7155 49.296 62.4922 50.4131L52.5225 59.5156C51.337 60.5979 49.5196 60.5507 48.3916 59.4346L48.2842 59.3232L39.1816 49.3535C38.0648 48.1301 38.1507 46.2324 39.374 45.1152C40.5975 43.9979 42.4961 44.0841 43.6133 45.3076L47.4756 49.5381C47.1908 44.7613 46.2876 40.9448 44.9482 37.8291C43.0666 33.4521 40.2851 30.3614 36.9629 27.8975C31.8259 24.0875 25.8071 22.1663 19.2891 21.5732L23.8633 25.9072C25.0662 27.0468 25.1178 28.9457 23.9785 30.1484C22.8746 31.3135 21.0576 31.3982 19.8516 30.3662L19.7373 30.2627L9.93652 20.9785C8.73384 19.839 8.6828 17.9401 9.82227 16.7373L19.1064 6.93652Z" stroke="${WHITE}" stroke-width="3"/></g>${transformEnd}<defs><filter id="filter0_d_1_14" x="0" y="0" width="72.4696" height="72.3004" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="3"/><feGaussianBlur stdDeviation="3.75"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_14"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_14" result="shape"/></filter></defs></svg>`;
return `url("data:image/svg+xml,${encodeURIComponent(svg)}") 12 12, alias`;
};
diff --git a/packages/studio/src/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.tsx b/packages/studio/src/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.tsx
index f5faac1f48..20cb00fadc 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import {inlineCodeSnippet} from '../../components/Menu/styles';
-import {BORDER_COLOR} from '../../helpers/colors';
+import {BLACK_HEX, WHITE} from '../../helpers/colors';
export const CalculateMetadataErrorExplainer: React.FC<{}> = () => {
return (
@@ -13,9 +13,9 @@ export const CalculateMetadataErrorExplainer: React.FC<{}> = () => {
const style: React.CSSProperties = {
borderRadius: 3,
- color: 'white',
+ color: WHITE,
padding: 12,
- backgroundColor: BORDER_COLOR,
+ backgroundColor: BLACK_HEX,
fontSize: 14,
fontFamily: 'sans-serif',
};
diff --git a/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx b/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx
index 059e16d850..4177928649 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/CodeFrame.tsx
@@ -1,7 +1,15 @@
import type {ScriptLine} from '@remotion/studio-shared';
import React from 'react';
import {HORIZONTAL_SCROLLBAR_CLASSNAME} from '../../components/Menu/is-menu-item';
-import {BLUE} from '../../helpers/colors';
+import {
+ BLACK,
+ BLUE,
+ ERROR_CODE_FRAME_BACKGROUND,
+ ERROR_CODE_FRAME_LINE_BACKGROUND,
+ TRANSPARENT,
+ WHITE,
+ WHITE_ALPHA_60,
+} from '../../helpers/colors';
const container: React.CSSProperties = {
display: 'flex',
@@ -10,7 +18,7 @@ const container: React.CSSProperties = {
};
const frame: React.CSSProperties = {
- backgroundColor: '#070707',
+ backgroundColor: ERROR_CODE_FRAME_BACKGROUND,
marginBottom: 20,
overflowY: 'auto',
};
@@ -45,8 +53,10 @@ export const CodeFrame: React.FC<{
<div
style={{
...lineNumber,
- backgroundColor: s.highlight ? 'white' : '#121212',
- color: s.highlight ? 'black' : 'rgba(255, 255, 255, 0.6)',
+ backgroundColor: s.highlight
+ ? WHITE
+ : ERROR_CODE_FRAME_LINE_BACKGROUND,
+ color: s.highlight ? BLACK : WHITE_ALPHA_60,
}}
>
{String(s.lineNumber).padStart(lineNumberWidth, ' ')}
@@ -56,8 +66,8 @@ export const CodeFrame: React.FC<{
fontFamily: 'monospace',
whiteSpace: 'pre',
tabSize: 2,
- color: s.highlight ? 'white' : 'rgba(255, 255, 255, 0.6)',
- backgroundColor: s.highlight ? BLUE : 'transparent',
+ color: s.highlight ? WHITE : WHITE_ALPHA_60,
+ backgroundColor: s.highlight ? BLUE : TRANSPARENT,
lineHeight: 1.7,
paddingRight: 12,
paddingLeft: 12,
diff --git a/packages/studio/src/error-overlay/remotion-overlay/CompositionIdListItem.tsx b/packages/studio/src/error-overlay/remotion-overlay/CompositionIdListItem.tsx
index 32be6f7339..a41a09d4a6 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/CompositionIdListItem.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/CompositionIdListItem.tsx
@@ -1,8 +1,8 @@
import React from 'react';
import {
- CLEAR_HOVER,
+ WHITE_ALPHA_06,
SELECTED_BACKGROUND,
- TEXT_COLOR,
+ WHITE_HEX,
} from '../../helpers/colors';
export const listItemStyle: React.CSSProperties = {
@@ -10,7 +10,7 @@ export const listItemStyle: React.CSSProperties = {
cursor: 'pointer',
borderRadius: 4,
lineHeight: 1.4,
- color: TEXT_COLOR,
+ color: WHITE_HEX,
fontFamily: 'inherit',
fontSize: 14,
};
@@ -20,7 +20,7 @@ export const listItemActiveStyle: React.CSSProperties = {
};
export const listItemHoverStyle: React.CSSProperties = {
- backgroundColor: CLEAR_HOVER,
+ backgroundColor: WHITE_ALPHA_06,
};
export const CompositionIdListItem: React.FC<{
diff --git a/packages/studio/src/error-overlay/remotion-overlay/DismissButton.tsx b/packages/studio/src/error-overlay/remotion-overlay/DismissButton.tsx
index ad39919b61..6b996d8a82 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/DismissButton.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/DismissButton.tsx
@@ -1,4 +1,5 @@
import React, {useCallback} from 'react';
+import {TRANSPARENT, WHITE} from '../../helpers/colors';
import {clearUrl} from '../../helpers/url-state';
const size: React.CSSProperties = {
@@ -9,7 +10,7 @@ const size: React.CSSProperties = {
const style: React.CSSProperties = {
appearance: 'none',
WebkitAppearance: 'none',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
border: 'none',
cursor: 'pointer',
};
@@ -29,7 +30,7 @@ export const DismissButton: React.FC = () => {
style={size}
>
<path
- fill="white"
+ fill={WHITE}
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
/>
</svg>
diff --git a/packages/studio/src/error-overlay/remotion-overlay/ErrorLoader.tsx b/packages/studio/src/error-overlay/remotion-overlay/ErrorLoader.tsx
index 969de272a1..2226e6753c 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/ErrorLoader.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/ErrorLoader.tsx
@@ -1,5 +1,6 @@
import {getLocationFromBuildError} from '@remotion/studio-shared';
import React, {useEffect, useState} from 'react';
+import {WHITE} from '../../helpers/colors';
import {wasErrorLoggedByServer} from '../error-origin';
import type {ErrorRecord} from '../react-overlay/listen-to-runtime-errors';
import {getErrorRecord} from '../react-overlay/listen-to-runtime-errors';
@@ -20,13 +21,13 @@ const container: React.CSSProperties = {
};
const errorWhileErrorStyle: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
lineHeight: 1.5,
whiteSpace: 'pre',
};
const errorWhileSymbolicatingStyle: React.CSSProperties = {
- color: 'white',
+ color: WHITE,
lineHeight: 1.5,
marginTop: 24,
opacity: 0.7,
diff --git a/packages/studio/src/error-overlay/remotion-overlay/ErrorMessage.tsx b/packages/studio/src/error-overlay/remotion-overlay/ErrorMessage.tsx
index eb65c20617..612ef79df2 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/ErrorMessage.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/ErrorMessage.tsx
@@ -1,9 +1,11 @@
import {PlayerInternals} from '@remotion/player';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import {
+ ERROR_MESSAGE_MASK_IMAGE,
INPUT_BACKGROUND,
- INPUT_BORDER_COLOR_HOVERED,
- INPUT_BORDER_COLOR_UNHOVERED,
+ WHITE_ALPHA_05,
+ BLACK_ALPHA_60,
+ WHITE,
} from '../../helpers/colors';
import {CaretDown} from './carets';
@@ -13,7 +15,7 @@ const maxLines = 2;
const buttonSize = 32;
-const maskImage = 'linear-gradient(to bottom, white 60%, transparent)';
+const maskImage = ERROR_MESSAGE_MASK_IMAGE;
const container: React.CSSProperties = {
position: 'relative',
@@ -34,7 +36,7 @@ const moreLine: React.CSSProperties = {
display: 'flex',
justifyContent: 'center',
position: 'absolute',
- border: `1px solid ${INPUT_BORDER_COLOR_HOVERED}`,
+ border: `1px solid ${WHITE_ALPHA_05}`,
height: 0,
marginTop: 4,
};
@@ -44,13 +46,13 @@ const moreButton: React.CSSProperties = {
width: buttonSize,
borderRadius: buttonSize / 2,
backgroundColor: INPUT_BACKGROUND,
- border: `1px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
+ border: `1px solid ${BLACK_ALPHA_60}`,
marginTop: -buttonSize / 2,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
cursor: 'pointer',
- color: 'white',
+ color: WHITE,
};
export const ErrorMessage: React.FC<{
diff --git a/packages/studio/src/error-overlay/remotion-overlay/HelpLink.tsx b/packages/studio/src/error-overlay/remotion-overlay/HelpLink.tsx
index 7f40d045a4..538213f50d 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/HelpLink.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/HelpLink.tsx
@@ -1,13 +1,13 @@
import React, {useCallback, useEffect} from 'react';
import {Button} from '../../components/Button';
-import {BLUE} from '../../helpers/colors';
+import {BLUE, WHITE} from '../../helpers/colors';
import {useKeybinding} from '../../helpers/use-keybinding';
import type {THelpLink} from './get-help-link';
import {ShortcutHint} from './ShortcutHint';
const buttonStyle: React.CSSProperties = {
backgroundColor: BLUE,
- color: 'white',
+ color: WHITE,
};
export const HelpLink: React.FC<{
diff --git a/packages/studio/src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx b/packages/studio/src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
index 8ec8b00f9c..880a455bb1 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
@@ -1,5 +1,10 @@
import React, {useEffect, useState} from 'react';
-import {BORDER_COLOR} from '../../helpers/colors';
+import {
+ BLACK_HEX,
+ ERROR_LINK_COLOR,
+ WHITE,
+ WHITE_ALPHA_10,
+} from '../../helpers/colors';
type ProbeResult =
| {type: 'loading'}
@@ -11,16 +16,16 @@ type ProbeResult =
const container: React.CSSProperties = {
borderRadius: 3,
- color: 'white',
+ color: WHITE,
padding: 12,
- backgroundColor: BORDER_COLOR,
+ backgroundColor: BLACK_HEX,
fontSize: 14,
fontFamily: 'sans-serif',
lineHeight: 1.5,
};
const codeStyle: React.CSSProperties = {
- backgroundColor: 'rgba(255,255,255,0.1)',
+ backgroundColor: WHITE_ALPHA_10,
padding: '2px 5px',
borderRadius: 3,
fontFamily: 'monospace',
@@ -28,7 +33,7 @@ const codeStyle: React.CSSProperties = {
};
const linkStyle: React.CSSProperties = {
- color: '#58a6ff',
+ color: ERROR_LINK_COLOR,
};
export const MediaPlaybackErrorExplainer: React.FC<{
diff --git a/packages/studio/src/error-overlay/remotion-overlay/Overlay.tsx b/packages/studio/src/error-overlay/remotion-overlay/Overlay.tsx
index 6b744b2931..d43c23796f 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/Overlay.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/Overlay.tsx
@@ -6,6 +6,7 @@ import React, {
} from 'react';
import {AbsoluteFill} from 'remotion';
import {MENU_TOOLBAR_HEIGHT} from '../../components/MenuToolbar';
+import {BACKGROUND_HEX, WHITE} from '../../helpers/colors';
import {KeybindingContextProvider} from '../../state/keybindings';
import {ErrorLoader} from './ErrorLoader';
@@ -29,7 +30,7 @@ const errorsAreTheSame = (first: Error, second: Error) => {
return first.stack === second.stack && first.message === second.message;
};
-const BACKGROUND_COLOR = '#1f2428';
+const BACKGROUND_COLOR = BACKGROUND_HEX;
export const Overlay: React.FC = () => {
const [errors, setErrors] = useState<State>({type: 'clear'});
@@ -71,7 +72,7 @@ export const Overlay: React.FC = () => {
style={{
backgroundColor: BACKGROUND_COLOR,
overflow: 'auto',
- color: 'white',
+ color: WHITE,
top: MENU_TOOLBAR_HEIGHT,
height: `calc(100% - ${MENU_TOOLBAR_HEIGHT}px)`,
}}
diff --git a/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx b/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx
index 73a8734698..5c4560d79e 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/StackFrame.tsx
@@ -1,13 +1,18 @@
import type {SymbolicatedStackFrame} from '@remotion/studio-shared';
import React, {useCallback, useState} from 'react';
import {Button} from '../../components/Button';
+import {
+ BLACK,
+ BORDER_STACK_FRAME_BLUE,
+ WHITE_ALPHA_60,
+} from '../../helpers/colors';
import {openInEditor} from '../../helpers/open-in-editor';
import {CaretDown, CaretRight} from './carets';
import {CodeFrame} from './CodeFrame';
import {formatLocation} from './format-location';
const location: React.CSSProperties = {
- color: 'rgba(255, 255, 255, 0.6)',
+ color: WHITE_ALPHA_60,
fontFamily: 'monospace',
fontSize: 14,
};
@@ -20,8 +25,8 @@ const header: React.CSSProperties = {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
- borderBottom: '1px solid rgb(66, 144, 245)',
- backgroundColor: 'black',
+ borderBottom: BORDER_STACK_FRAME_BLUE,
+ backgroundColor: BLACK,
};
const left: React.CSSProperties = {
diff --git a/packages/studio/src/error-overlay/remotion-overlay/Symbolicating.tsx b/packages/studio/src/error-overlay/remotion-overlay/Symbolicating.tsx
index 7a7c8bb86f..1c69943661 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/Symbolicating.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/Symbolicating.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {WHITE} from '../../helpers/colors';
export const Symbolicating: React.FC = (props) => {
return (
@@ -8,7 +9,7 @@ export const Symbolicating: React.FC = (props) => {
viewBox="0 0 32 32"
width="16"
height="16"
- fill="white"
+ fill={WHITE}
{...props}
>
<path opacity=".1" d="M14 0 H18 V8 H14 z" transform="rotate(0 16 16)">
diff --git a/packages/studio/src/error-overlay/remotion-overlay/carets.tsx b/packages/studio/src/error-overlay/remotion-overlay/carets.tsx
index e22837b769..302bff4631 100644
--- a/packages/studio/src/error-overlay/remotion-overlay/carets.tsx
+++ b/packages/studio/src/error-overlay/remotion-overlay/carets.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {CURRENT_COLOR} from '../../helpers/colors';
export const CaretRight = ({size}: {readonly size?: number}) => {
return (
@@ -10,7 +11,7 @@ export const CaretRight = ({size}: {readonly size?: number}) => {
viewBox="0 0 192 512"
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"
/>
</svg>
@@ -31,7 +32,7 @@ export const CaretDown: React.FC<{
style={{height: size ?? 20, transform: invert ? `rotate(180deg)` : ''}}
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
/>
</svg>
diff --git a/packages/studio/src/helpers/checkerboard-background.ts b/packages/studio/src/helpers/checkerboard-background.ts
index e1edaa1007..b3068de2a4 100644
--- a/packages/studio/src/helpers/checkerboard-background.ts
+++ b/packages/studio/src/helpers/checkerboard-background.ts
@@ -1,3 +1,5 @@
+import {BLACK, CHECKERBOARD_BACKGROUND_IMAGE, WHITE} from './colors';
+
export const getCheckerboardBackgroundSize = (size: number) =>
`${size}px ${size}px`;
export const getCheckerboardBackgroundPos = (size: number) =>
@@ -5,24 +7,15 @@ export const getCheckerboardBackgroundPos = (size: number) =>
export const checkerboardBackgroundColor = (checkerboard: boolean) => {
if (checkerboard) {
- return 'white';
+ return WHITE;
}
- return 'black';
+ return BLACK;
};
export const checkerboardBackgroundImage = (checkerboard: boolean) => {
if (checkerboard) {
- return `
- linear-gradient(
- 45deg,
- rgba(0, 0, 0, 0.1) 25%,
- transparent 25%
- ),
- linear-gradient(135deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),
- linear-gradient(135deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%)
- `;
+ return CHECKERBOARD_BACKGROUND_IMAGE;
}
return undefined;
diff --git a/packages/studio/src/helpers/colors.ts b/packages/studio/src/helpers/colors.ts
index fdfa1e9f41..94a7830387 100644
--- a/packages/studio/src/helpers/colors.ts
+++ b/packages/studio/src/helpers/colors.ts
@@ -1,27 +1,148 @@
+export const BLACK = 'black';
+export const WHITE = 'white';
+export const RED = 'red';
+export const TRANSPARENT = 'transparent';
+export const CURRENT_COLOR = 'currentColor';
+export const CURRENT_COLOR_LOWERCASE = 'currentcolor';
+export const WHITE_HEX = '#fff';
+export const WHITE_FULL_HEX = '#ffffff';
+export const BLACK_HEX = '#000';
+export const BLACK_FULL_HEX = '#000000';
+
export const BACKGROUND = 'rgb(31,36,40)';
+export const BACKGROUND_HEX = '#1f2428';
export const BACKGROUND__TRANSPARENT = 'rgba(31,36,40, 0)';
export const INPUT_BACKGROUND = '#2f363d';
-export const BORDER_COLOR = '#000';
export const LIGHT_COLOR = '#ddd';
export const SELECTED_BACKGROUND = 'hsla(0, 0%, 100%, 0.15)';
export const LIGHT_TEXT = '#A6A7A9';
export const RULER_COLOR = '#808080';
-export const VERY_LIGHT_TEXT = 'rgba(255, 255, 255, 0.3)';
+export const WHITE_ALPHA_05 = 'rgba(255, 255, 255, 0.05)';
+export const WHITE_ALPHA_06 = 'rgba(255, 255, 255, 0.06)';
+export const WHITE_ALPHA_08 = 'rgba(255, 255, 255, 0.08)';
+export const WHITE_ALPHA_10 = 'rgba(255, 255, 255, 0.1)';
+export const WHITE_ALPHA_12 = 'rgba(255, 255, 255, 0.12)';
+export const WHITE_ALPHA_15 = 'rgba(255, 255, 255, 0.15)';
+export const WHITE_ALPHA_20 = 'rgba(255, 255, 255, 0.2)';
+export const WHITE_ALPHA_25 = 'rgba(255, 255, 255, 0.25)';
+export const WHITE_ALPHA_30 = 'rgba(255, 255, 255, 0.3)';
+export const WHITE_ALPHA_35 = 'rgba(255, 255, 255, 0.35)';
+export const WHITE_ALPHA_40 = 'rgba(255, 255, 255, 0.4)';
+export const WHITE_ALPHA_45 = 'rgba(255, 255, 255, 0.45)';
+export const WHITE_ALPHA_50 = 'rgba(255, 255, 255, 0.5)';
+export const WHITE_ALPHA_60 = 'rgba(255, 255, 255, 0.6)';
+export const WHITE_ALPHA_70 = 'rgba(255, 255, 255, 0.7)';
+export const WHITE_ALPHA_72 = 'rgba(255, 255, 255, 0.72)';
+export const WHITE_ALPHA_80 = 'rgba(255, 255, 255, 0.8)';
+export const BLACK_ALPHA_10 = 'rgba(0, 0, 0, 0.1)';
+export const BLACK_ALPHA_28 = 'rgba(0, 0, 0, 0.28)';
+export const BLACK_ALPHA_30 = 'rgba(0, 0, 0, 0.3)';
+export const BLACK_ALPHA_40 = 'rgba(0, 0, 0, 0.4)';
+export const BLACK_ALPHA_50 = 'rgba(0, 0, 0, 0.5)';
+export const BLACK_ALPHA_60 = 'rgba(0, 0, 0, 0.6)';
+export const BLACK_ALPHA_80 = 'rgba(0, 0, 0, 0.8)';
+export const BLACK_ALPHA_85 = 'rgba(0, 0, 0, 0.85)';
+export const BLACK_ALPHA_90 = 'rgba(0, 0, 0, 0.9)';
+export const BLACK_OPAQUE = 'rgba(0, 0, 0, 1)';
const SELECTED_HOVER_BACKGROUND = 'hsla(0, 0%, 100%, 0.25)';
-export const CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';
-export const INPUT_BORDER_COLOR_UNHOVERED = 'rgba(0, 0, 0, 0.6)';
-export const INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
export const FAIL_COLOR = '#ff3232';
-export const TEXT_COLOR = '#fff';
export const WARNING_COLOR = '#f1c40f';
export const BLUE = '#0b84f3';
+export const BLUE_HOVERED = '#4da3f7';
export const BLUE_DISABLED = '#284f73';
-export const LIGHT_TRANSPARENT = 'rgba(255, 255, 255, 0.7)';
export const UNSELECTED_GUIDE = '#7e1219';
export const SELECTED_GUIDE = '#d22d3a';
export const LINE_COLOR = '#363A3E';
export const TIMELINE_TRACK_SEPARATOR = '#13161B';
+export const LIGHT_GRAY = '#ccc';
+export const KEYBOARD_SHORTCUT_KEY_COLOR = '#eee';
+export const NOTIFICATION_BACKGROUND = '#111111';
+export const RENDER_STATUS_BACKGROUND = '#222';
+export const ERROR_CODE_FRAME_BACKGROUND = '#070707';
+export const ERROR_CODE_FRAME_LINE_BACKGROUND = '#121212';
+export const ERROR_LINK_COLOR = '#58a6ff';
+export const INFO_BLUE = '#60a5fa';
+export const SERVER_DISCONNECTED_BACKGROUND = '#e74c3c';
+export const STACK_FRAME_BORDER_BLUE = 'rgb(66, 144, 245)';
+export const TIMELINE_BACKGROUND_COLOR = '#0F1113';
+export const TIMELINE_SELECTED_BACKGROUND_COLOR = '#3B3F42';
+export const TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR = '#B0B0B0';
+export const TIMELINE_BLUE = '#0b84ff';
+export const TIMELINE_PLAYHEAD_COLOR = '#f02c00';
+export const TIMELINE_DROP_BLUE_ALPHA_12 = 'rgba(0, 155, 255, 0.12)';
+export const TIMELINE_DROP_BLUE_ALPHA_16 = 'rgba(0, 155, 255, 0.16)';
+export const TIMELINE_DROP_BLUE_ALPHA_75 = 'rgba(0, 155, 255, 0.75)';
+export const TIMELINE_MARQUEE_BLUE_ALPHA_16 = 'rgba(70, 130, 255, 0.16)';
+export const TIMELINE_MARQUEE_BLUE_ALPHA_75 = 'rgba(70, 130, 255, 0.75)';
+export const EASING_SELECTED_BACKGROUND = 'rgba(11, 132, 243, 0.18)';
+export const INFO_BLUE_BACKGROUND = 'rgba(59, 130, 246, 0.15)';
+
+export const BORDER_BLACK = `1px solid ${BLACK_HEX}`;
+export const BORDER_WHITE = `1px solid ${WHITE_HEX}`;
+export const BORDER_WHITE_2PX = `2px solid ${WHITE_HEX}`;
+export const BORDER_CURRENT_COLOR = `1px solid ${CURRENT_COLOR}`;
+export const BORDER_TRANSPARENT_2PX = `2px solid ${TRANSPARENT}`;
+export const BORDER_BLACK_ALPHA_50 = `1px solid ${BLACK_ALPHA_50}`;
+export const BORDER_BLACK_ALPHA_60 = `1px solid ${BLACK_ALPHA_60}`;
+export const BORDER_WHITE_ALPHA_12 = `1px solid ${WHITE_ALPHA_12}`;
+export const BORDER_WHITE_ALPHA_20 = `1px solid ${WHITE_ALPHA_20}`;
+export const BORDER_INFO_BLUE = '1px solid rgba(59, 130, 246, 0.4)';
+export const BORDER_STACK_FRAME_BLUE = `1px solid ${STACK_FRAME_BORDER_BLUE}`;
+export const BORDER_TIMELINE_DROP_BLUE = `1px solid ${TIMELINE_DROP_BLUE_ALPHA_75}`;
+export const BORDER_TIMELINE_MARQUEE_BLUE = `1px solid ${TIMELINE_MARQUEE_BLUE_ALPHA_75}`;
+export const SHADOW_BLACK = `0 0 4px ${BLACK}`;
+export const SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM = `0 2px 8px ${BLACK_ALPHA_50}`;
+export const SHADOW_BLACK_ALPHA_50_TOWARDS_TOP = `0 -2px 8px ${BLACK_ALPHA_50}`;
+export const NOTIFICATION_SHADOW = `0 2px 3px ${BLACK_OPAQUE}`;
+export const SERVER_DISCONNECTED_SHADOW = `0 2px 4px ${BLACK_ALPHA_40}`;
+export const COLOR_PICKER_POPUP_SHADOW = `0 4px 16px ${BLACK_ALPHA_50}`;
+export const COLOR_PICKER_HANDLE_SHADOW = `0 0 0 1px ${BLACK_ALPHA_60}`;
+export const NOTIFICATION_BORDER = `0.25px solid ${WHITE_ALPHA_10}`;
+
+export const HOT_MIDDLEWARE_ERROR_STYLE = 'color: #ff0000;';
+export const HOT_MIDDLEWARE_WARNING_STYLE = 'color: #999933;';
+export const FOCUS_BOX_SHADOW =
+ `inset 1px 1px #555, inset -1px -1px #555, ` +
+ `inset 1px -1px #555, inset -1px 1px #555`;
+
+export const CHECKERBOARD_BACKGROUND_IMAGE = `
+ linear-gradient(
+ 45deg,
+ ${BLACK_ALPHA_10} 25%,
+ ${TRANSPARENT} 25%
+ ),
+ linear-gradient(135deg, ${BLACK_ALPHA_10} 25%, ${TRANSPARENT} 25%),
+ linear-gradient(45deg, ${TRANSPARENT} 75%, ${BLACK_ALPHA_10} 75%),
+ linear-gradient(135deg, ${TRANSPARENT} 75%, ${BLACK_ALPHA_10} 75%)
+ `;
+
+export const COLOR_PICKER_CHECKER_BACKGROUND_IMAGE =
+ `linear-gradient(45deg, #888 25%, ${TRANSPARENT} 25%), ` +
+ `linear-gradient(-45deg, #888 25%, ${TRANSPARENT} 25%), ` +
+ `linear-gradient(45deg, ${TRANSPARENT} 75%, #888 75%), ` +
+ `linear-gradient(-45deg, ${TRANSPARENT} 75%, #888 75%)`;
+export const COLOR_PICKER_CHECKER_BACKGROUND_COLOR = '#444';
+export const COLOR_PICKER_SATURATION_VALUE_GRADIENT = `linear-gradient(to right, ${WHITE_HEX}, ${TRANSPARENT})`;
+export const COLOR_PICKER_SATURATION_BLACK_GRADIENT = `linear-gradient(to top, ${BLACK_HEX}, ${TRANSPARENT})`;
+export const COLOR_PICKER_ALPHA_TRANSPARENT = 'rgba(0, 0, 0, 0)';
+export const COLOR_PICKER_HUE_GRADIENT =
+ 'linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)';
+
+export const ERROR_MESSAGE_MASK_IMAGE = `linear-gradient(to bottom, ${WHITE} 60%, ${TRANSPARENT})`;
+export const SELECTED_OUTLINE_DROP_SHADOW = `drop-shadow(0 0 1px ${WHITE_ALPHA_20})`;
+export const SELECTED_OUTLINE_UV_DROP_SHADOW = `drop-shadow(0 1px 2px ${BLACK_ALPHA_28})`;
+export const LOOPED_INDICATOR_DROP_SHADOW =
+ `drop-shadow(0 0 2px ${BLACK_ALPHA_90}) ` +
+ `drop-shadow(0 1px 2px ${BLACK_ALPHA_80})`;
+
+export const TIMELINE_AUDIO_GRADIENT =
+ 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
+export const TIMELINE_VIDEO_GRADIENT =
+ 'linear-gradient(to top, #8e44ad, #9b59b6)';
+export const TIMELINE_IMAGE_GRADIENT =
+ 'linear-gradient(to top, #2980b9, #3498db)';
+
export const getBackgroundFromHoverState = ({
selected,
hovered,
@@ -38,8 +159,8 @@ export const getBackgroundFromHoverState = ({
}
if (hovered) {
- return CLEAR_HOVER;
+ return WHITE_ALPHA_06;
}
- return 'transparent';
+ return TRANSPARENT;
};
diff --git a/packages/studio/src/helpers/inject-css.ts b/packages/studio/src/helpers/inject-css.ts
index c9abad1d2e..dd0c853dd6 100644
--- a/packages/studio/src/helpers/inject-css.ts
+++ b/packages/studio/src/helpers/inject-css.ts
@@ -1,5 +1,14 @@
import {Internals} from 'remotion';
import {DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME} from '../components/RenderModal/SchemaEditor/scroll-to-default-props-path';
+import {
+ BLACK,
+ BLUE,
+ BLUE_HOVERED,
+ BORDER_BLACK,
+ FOCUS_BOX_SHADOW,
+ TRANSPARENT,
+ WHITE,
+} from './colors';
const makeDefaultGlobalCSS = () => {
const unhoveredDragAreaFactor = 2;
@@ -9,13 +18,13 @@ const makeDefaultGlobalCSS = () => {
const fromMiddleHovered = 50 / hoveredDragAreaFactor;
return `
- html {
- --remotion-cli-internals-blue: #0b84f3;
- --remotion-cli-internals-blue-hovered: #4da3f7;
- overscroll-behavior-y: none;
- overscroll-behavior-x: none;
- }
-
+ html {
+ --remotion-cli-internals-blue: ${BLUE};
+ --remotion-cli-internals-blue-hovered: ${BLUE_HOVERED};
+ overscroll-behavior-y: none;
+ overscroll-behavior-x: none;
+ }
+
body {
overscroll-behavior-y: none;
overscroll-behavior-x: none;
@@ -27,92 +36,84 @@ const makeDefaultGlobalCSS = () => {
user-select: none;
-webkit-user-select: none;
}
-
+
.remotion-splitter-horizontal {
- transform: scaleY(${unhoveredDragAreaFactor});
- background: linear-gradient(
- to bottom,
- transparent ${50 - fromMiddle}%,
- black ${50 - fromMiddle}%,
- black ${50 + fromMiddle}%,
- transparent ${50 + fromMiddle}%
- );
- }
-
+ transform: scaleY(${unhoveredDragAreaFactor});
+ background: linear-gradient(
+ to bottom,
+ ${TRANSPARENT} ${50 - fromMiddle}%,
+ ${BLACK} ${50 - fromMiddle}%,
+ ${BLACK} ${50 + fromMiddle}%,
+ ${TRANSPARENT} ${50 + fromMiddle}%
+ );
+ }
+
.remotion-splitter-horizontal.remotion-splitter-active, .remotion-splitter-horizontal.remotion-splitter-hover {
- background: linear-gradient(
- to bottom,
- transparent ${50 - fromMiddleHovered}%,
- var(--remotion-cli-internals-blue) ${50 - fromMiddleHovered}%,
- var(--remotion-cli-internals-blue) ${50 + fromMiddleHovered}%,
- transparent ${50 + fromMiddleHovered}%
- );
+ background: linear-gradient(
+ to bottom,
+ ${TRANSPARENT} ${50 - fromMiddleHovered}%,
+ var(--remotion-cli-internals-blue) ${50 - fromMiddleHovered}%,
+ var(--remotion-cli-internals-blue) ${50 + fromMiddleHovered}%,
+ ${TRANSPARENT} ${50 + fromMiddleHovered}%
+ );
cursor: row-resize;
transform: scaleY(${hoveredDragAreaFactor});
z-index: 1000;
}
-
+
.remotion-splitter-vertical {
- transform: scaleX(${unhoveredDragAreaFactor});
- background: linear-gradient(
- to right,
- transparent ${50 - fromMiddle}%,
- black ${50 - fromMiddle}%,
- black ${50 + fromMiddle}%,
- transparent ${50 + fromMiddle}%
- );
- }
-
+ transform: scaleX(${unhoveredDragAreaFactor});
+ background: linear-gradient(
+ to right,
+ ${TRANSPARENT} ${50 - fromMiddle}%,
+ ${BLACK} ${50 - fromMiddle}%,
+ ${BLACK} ${50 + fromMiddle}%,
+ ${TRANSPARENT} ${50 + fromMiddle}%
+ );
+ }
+
.remotion-splitter-vertical.remotion-splitter-active, .remotion-splitter-vertical.remotion-splitter-hover {
- background: linear-gradient(
- to right,
- transparent ${50 - fromMiddleHovered}%,
- var(--remotion-cli-internals-blue) ${50 - fromMiddleHovered}%,
- var(--remotion-cli-internals-blue) ${50 + fromMiddleHovered}%,
- transparent ${50 + fromMiddleHovered}%
- );
+ background: linear-gradient(
+ to right,
+ ${TRANSPARENT} ${50 - fromMiddleHovered}%,
+ var(--remotion-cli-internals-blue) ${50 - fromMiddleHovered}%,
+ var(--remotion-cli-internals-blue) ${50 + fromMiddleHovered}%,
+ ${TRANSPARENT} ${50 + fromMiddleHovered}%
+ );
transform: scaleX(${hoveredDragAreaFactor});
cursor: col-resize;
z-index: 1000;
}
-
+
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
-
+
input:focus,
textarea:focus,
button:focus:not(.__remotion_input_dragger):not(.__remotion_color_swatch),
a:focus {
- outline: none;
- box-shadow:
- inset 1px 1px #555,
- inset -1px -1px #555,
- inset 1px -1px #555,
- inset -1px 1px #555;
- }
+ outline: none;
+ box-shadow: ${FOCUS_BOX_SHADOW};
+ }
.__remotion_color_swatch:focus {
outline: none;
}
- .__remotion_input_dragger:focus-visible {
- outline: none;
- box-shadow:
- inset 1px 1px #555,
- inset -1px -1px #555,
- inset 1px -1px #555,
- inset -1px 1px #555;
- }
-
+ .__remotion_input_dragger:focus-visible {
+ outline: none;
+ box-shadow: ${FOCUS_BOX_SHADOW};
+ }
+
.__remotion_thumb,
.__remotion_thumb::-webkit-slider-thumb {
- -webkit-appearance: none;
- -webkit-tap-highlight-color: transparent;
- }
-
+ -webkit-appearance: none;
+ -webkit-tap-highlight-color: ${TRANSPARENT};
+ }
+
.__remotion_thumb {
pointer-events: none;
position: absolute;
@@ -123,32 +124,32 @@ const makeDefaultGlobalCSS = () => {
margin-left: -2px;
z-index: 2;
}
-
- /* For Firefox browsers */
- .__remotion_thumb::-moz-range-thumb {
- border: 1px solid black;
- border-radius: 2px;
- cursor: pointer;
- height: 37px;
- width: 10px;
- pointer-events: all;
- border-color: black;
- background-color: white;
- position: relative;
- }
-
- /* For Chrome browsers */
- .__remotion_thumb::-webkit-slider-thumb {
- border: 1px solid black;
- border-radius: 2px;
- cursor: pointer;
- height: 39px;
- width: 10px;
- pointer-events: all;
- border-color: black;
- background-color: white;
- position: relative;
- }
+
+ /* For Firefox browsers */
+ .__remotion_thumb::-moz-range-thumb {
+ border: ${BORDER_BLACK};
+ border-radius: 2px;
+ cursor: pointer;
+ height: 37px;
+ width: 10px;
+ pointer-events: all;
+ border-color: ${BLACK};
+ background-color: ${WHITE};
+ position: relative;
+ }
+
+ /* For Chrome browsers */
+ .__remotion_thumb::-webkit-slider-thumb {
+ border: ${BORDER_BLACK};
+ border-radius: 2px;
+ cursor: pointer;
+ height: 39px;
+ width: 10px;
+ pointer-events: all;
+ border-color: ${BLACK};
+ background-color: ${WHITE};
+ position: relative;
+ }
.__remotion_input_dragger:hover span {
color: var(--remotion-cli-internals-blue-hovered) !important;
diff --git a/packages/studio/src/helpers/use-menu-structure.tsx b/packages/studio/src/helpers/use-menu-structure.tsx
index 376b44a80d..ff8bb37510 100644
--- a/packages/studio/src/helpers/use-menu-structure.tsx
+++ b/packages/studio/src/helpers/use-menu-structure.tsx
@@ -28,6 +28,7 @@ import type {SidebarCollapsedState} from '../state/sidebar';
import {SidebarContext} from '../state/sidebar';
import {checkFullscreenSupport} from './check-fullscreen-support';
import {StudioServerConnectionCtx} from './client-id';
+import {WHITE_HEX} from './colors';
import {getGitMenuItem} from './get-git-menu-item';
import {useMobileLayout} from './mobile-layout';
import {openInEditor, preloadCompositionComponentInfo} from './open-in-editor';
@@ -259,8 +260,8 @@ export const useMenuStructure = (
style={rotate}
>
<path
- fill="#fff"
- stroke="#fff"
+ fill={WHITE_HEX}
+ stroke={WHITE_HEX}
strokeWidth="100"
strokeLinejoin="round"
d="M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z"
diff --git a/packages/studio/src/hot-middleware-client/client.ts b/packages/studio/src/hot-middleware-client/client.ts
index 97f438ffcd..ee981b2495 100644
--- a/packages/studio/src/hot-middleware-client/client.ts
+++ b/packages/studio/src/hot-middleware-client/client.ts
@@ -10,6 +10,10 @@
import type {HotMiddlewareMessage} from '@remotion/studio-shared';
import {hotMiddlewareOptions, stripAnsi} from '@remotion/studio-shared';
import {markErrorMessageAsLoggedByServer} from '../error-overlay/error-origin';
+import {
+ HOT_MIDDLEWARE_ERROR_STYLE,
+ HOT_MIDDLEWARE_WARNING_STYLE,
+} from '../helpers/colors';
import {subscribeToPreviewServerEvents} from '../helpers/preview-server-events';
import {processUpdate} from './process-update';
@@ -24,8 +28,8 @@ type Reporter = ReturnType<typeof createReporter>;
function createReporter() {
const styles = {
- errors: 'color: #ff0000;',
- warnings: 'color: #999933;',
+ errors: HOT_MIDDLEWARE_ERROR_STYLE,
+ warnings: HOT_MIDDLEWARE_WARNING_STYLE,
};
let previousProblems: string | null = null;
diff --git a/packages/studio/src/icons/Checkmark.tsx b/packages/studio/src/icons/Checkmark.tsx
index 193da50ed0..79bf11b091 100644
--- a/packages/studio/src/icons/Checkmark.tsx
+++ b/packages/studio/src/icons/Checkmark.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const Checkmark: React.FC<{readonly size?: number}> = ({size = 14}) => (
<svg
@@ -8,7 +9,7 @@ export const Checkmark: React.FC<{readonly size?: number}> = ({size = 14}) => (
style={{width: size, height: size}}
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"
/>
</svg>
diff --git a/packages/studio/src/icons/audio.tsx b/packages/studio/src/icons/audio.tsx
index daf9ca16f7..4f35de9e68 100644
--- a/packages/studio/src/icons/audio.tsx
+++ b/packages/studio/src/icons/audio.tsx
@@ -1,9 +1,10 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const AudioIcon = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M243 32.32C105.5 39.15 0 157.8 0 295.5v120.4C0 451.3 28.63 480 64 480h32c17.62 0 32-14.38 32-32V288c0-17.62-14.38-32-32-32H64c-10.79 0-20.8 2.9-29.72 7.7 14.2-106.8 100.5-193.9 210.4-199.4 120.5-5.965 221.7 83.92 234 199.9-9.08-5.1-19.48-8.2-30.68-8.2h-32c-17.62 0-32 14.38-32 32v160c0 17.62 14.38 32 32 32h32c35.38 0 64-28.75 64-64.13V287.9c0-145.4-122-262.88-269-255.58zM64 288h32v160H64c-17.62 0-32-14.5-32-32.13v-95.75C32 302.5 46.38 288 64 288zm416 127.9c0 17.6-14.4 32.1-32 32.1h-32V288h32c17.62 0 32 14.5 32 32.13v95.77z"
/>
</svg>
diff --git a/packages/studio/src/icons/caret.tsx b/packages/studio/src/icons/caret.tsx
index 4f1e25361a..442c13f328 100644
--- a/packages/studio/src/icons/caret.tsx
+++ b/packages/studio/src/icons/caret.tsx
@@ -1,5 +1,5 @@
import React, {useMemo} from 'react';
-import {LIGHT_TEXT} from '../helpers/colors';
+import {CURRENT_COLOR, LIGHT_TEXT} from '../helpers/colors';
const caret: React.CSSProperties = {
height: 12,
@@ -20,7 +20,7 @@ const angleDown: React.CSSProperties = {
export const CaretRight = () => (
<svg viewBox="0 0 192 512" style={caret}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"
/>
</svg>
@@ -32,7 +32,7 @@ export const CaretDown: React.FC<{readonly small?: boolean}> = ({
return (
<svg viewBox="0 0 320 512" style={small ? caretDownSmall : caretDown}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
/>
</svg>
diff --git a/packages/studio/src/icons/certificate.tsx b/packages/studio/src/icons/certificate.tsx
index 77b54a73ef..992116f192 100644
--- a/packages/studio/src/icons/certificate.tsx
+++ b/packages/studio/src/icons/certificate.tsx
@@ -1,7 +1,8 @@
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const CertificateIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M192 32l128 0 0 96c0 35.3 28.7 64 64 64l96 0 0 256c0 17.7-14.3 32-32 32l-192 0 0 32 192 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L370.7 18.7C358.7 6.7 342.5 0 325.5 0L192 0c-35.3 0-64 28.7-64 64l0 80c10.9 0 21.6 1 32 2.9L160 64c0-17.7 14.3-32 32-32zM352 45.3L466.7 160 384 160c-17.7 0-32-14.3-32-32l0-82.7zM32 320a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM176 438.7l0 66.3-40.1-22.9c-4.9-2.8-11-2.8-15.9 0L80 505 80 438.7c14.8 6 31 9.3 48 9.3s33.2-3.3 48-9.3zm32-18.8c29.3-23.5 48-59.5 48-99.9 0-70.7-57.3-128-128-128S0 249.3 0 320c0 40.4 18.7 76.5 48 99.9l0 101.8c0 12.3 10 22.3 22.3 22.3 3.9 0 7.7-1 11.1-2.9l46.6-26.6 46.6 26.6c3.4 1.9 7.2 2.9 11.1 2.9 12.3 0 22.3-10 22.3-22.3l0-101.8zM128 344a24 24 0 1 1 0-48 24 24 0 1 1 0 48zm0-80a56 56 0 1 0 0 112 56 56 0 1 0 0-112z"
/>
</svg>
diff --git a/packages/studio/src/icons/data.tsx b/packages/studio/src/icons/data.tsx
index 8391a2145f..1e3be97a68 100644
--- a/packages/studio/src/icons/data.tsx
+++ b/packages/studio/src/icons/data.tsx
@@ -1,10 +1,11 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const DataIcon = (props: SVGProps<SVGSVGElement>) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M224 512C100.3 512 0 476.2 0 432V80C0 35.82 100.3 0 224 0C347.7 0 448 35.82 448 80V432C448 476.2 347.7 512 224 512zM416 80.45C415.7 79.69 414.4 77.27 409.8 73.31C402.4 67.11 389.9 60.09 371.6 53.57C335.4 40.62 283.2 32 224 32C164.8 32 112.6 40.62 76.37 53.57C58.1 60.09 45.59 67.11 38.25 73.31C33.55 77.27 32.29 79.69 32 80.45V182.1C46.47 192.7 69.9 202.8 100.9 210.4C135.5 218.9 177.1 224 224 224C270 224 312.5 218.9 347.1 210.4C378.1 202.8 401.5 192.7 416 182.1V80.45zM416 219.5C398.8 228.4 377.9 235.8 354.8 241.5C317.3 250.7 272.2 256 224 256C175.8 256 130.7 250.7 93.22 241.5C70.11 235.8 49.18 228.4 32 219.5V310.1C46.47 320.7 69.9 330.8 100.9 338.4C135.5 346.9 177.1 352 224 352C270 352 312.5 346.9 347.1 338.4C378.1 330.8 401.5 320.7 416 310.1V219.5zM38.25 438.7C45.59 444.9 58.1 451.9 76.37 458.4C112.6 471.4 164.8 480 224 480C283.2 480 335.4 471.4 371.6 458.4C389.9 451.9 402.4 444.9 409.8 438.7C414.4 434.7 415.7 432.3 416 431.6V347.5C398.8 356.4 377.9 363.8 354.8 369.5C317.3 378.7 272.2 384 224 384C175.8 384 130.7 378.7 93.22 369.5C70.11 363.8 49.18 356.4 32 347.5V431.6C32.29 432.3 33.55 434.7 38.25 438.7zM416 431.4C416.1 431.3 416.1 431.3 416.1 431.3L416 431.4zM31.96 431.4C31.94 431.3 31.93 431.3 31.92 431.3L31.96 431.4zM31.96 80.56C31.93 80.65 31.92 80.7 31.92 80.7L31.96 80.56zM416.1 80.7C416.1 80.7 416.1 80.65 416 80.56z"
/>
</svg>
diff --git a/packages/studio/src/icons/eyedropper.tsx b/packages/studio/src/icons/eyedropper.tsx
index 12f4ff0b68..e1b8d932c9 100644
--- a/packages/studio/src/icons/eyedropper.tsx
+++ b/packages/studio/src/icons/eyedropper.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const EyedropperIcon: React.FC<
SVGProps<SVGSVGElement> & {color?: string}
> = ({color, ...props}) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" {...props}>
<path
- fill={color ?? 'currentColor'}
+ fill={color ?? CURRENT_COLOR}
d="M263 233C278.6 248.6 315.3 285.3 373.1 343.1C400.1 370.1 414 384 415 385C424.4 394.4 439.6 394.4 448.9 385C458.2 375.6 458.3 360.4 448.9 351.1L440.9 343.1C457.3 326.7 492.4 291.6 546.1 237.9C565.2 218.8 575.9 192.9 575.9 165.9C575.9 109.7 530.3 64.1 474.1 64.1C447.1 64.1 421.2 74.8 402.1 93.9C348.4 147.6 313.3 182.7 296.9 199.1L288.9 191.1C279.5 181.7 264.3 181.7 255 191.1C245.7 200.5 245.6 215.7 255 225L255 225L263 233zM512.2 203.9L407 309.1L330.9 233L436.1 127.8C446.2 117.7 459.9 112 474.2 112C503.9 112 528 136.1 528 165.8C528 180.1 522.3 193.8 512.2 203.9zM117.1 393C103.6 406.5 96 424.8 96 443.9L96 496.8L68 538.8C61.7 548.3 62.9 561 71 569.1C79.1 577.2 91.8 578.4 101.3 572.1L143.3 544.1L196.2 544.1C215.3 544.1 233.6 536.5 247.1 523L366.1 404L332.2 370.1L213.2 489.1C208.7 493.6 202.6 496.1 196.2 496.1L144.1 496.1L144.1 444C144.1 437.6 146.6 431.5 151.1 427L270.1 308L236.2 274.1L117.2 393.1z"
/>
</svg>
diff --git a/packages/studio/src/icons/file.tsx b/packages/studio/src/icons/file.tsx
index c635f02a6b..f936499e95 100644
--- a/packages/studio/src/icons/file.tsx
+++ b/packages/studio/src/icons/file.tsx
@@ -1,4 +1,5 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const FileIcon: React.FC<SVGProps<SVGSVGElement> & {color?: string}> = ({
color,
@@ -6,7 +7,7 @@ export const FileIcon: React.FC<SVGProps<SVGSVGElement> & {color?: string}> = ({
}) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" {...props}>
<path
- fill={color ?? 'currentColor'}
+ fill={color ?? CURRENT_COLOR}
d="M0 64C0 28.65 28.65 0 64 0h156.1c12.7 0 25 5.057 34 14.06L369.9 129.9c9 9 14.1 21.3 14.1 34V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm352 128H240c-26.5 0-48-21.5-48-48V32H64c-17.67 0-32 14.33-32 32v384c0 17.7 14.33 32 32 32h256c17.7 0 32-14.3 32-32V192zm-4.7-39.4L231.4 36.69c-2-2.07-4.6-3.51-7.4-4.21V144c0 8.8 7.2 16 16 16h111.5c-.7-2.8-2.1-5.4-4.2-7.4z"
/>
</svg>
diff --git a/packages/studio/src/icons/frame.tsx b/packages/studio/src/icons/frame.tsx
index a2e9057d1c..3b34ae2988 100644
--- a/packages/studio/src/icons/frame.tsx
+++ b/packages/studio/src/icons/frame.tsx
@@ -1,9 +1,10 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const PicIcon = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M324.9 157.8c-11.38-17.38-39.89-17.31-51.23-.063L200.5 268.5l-16.4-22.6c-11.4-16.8-38.2-16-49.7 0l-64.52 89.16c-6.797 9.406-7.75 21.72-2.547 32C72.53 377.5 83.05 384 94.75 384h322.5c11.41 0 21.8-6.281 27.14-16.38a30.922 30.922 0 0 0-1.516-31.56L324.9 157.8zM95.8 352l62.39-87.38 29.91 41.34c3.1 4.24 8.3 7.24 13.3 6.64 5.25-.125 10.12-2.781 13.02-7.188l83.83-129.9L415 352H95.8zM447.1 32h-384C28.65 32-.01 60.65-.01 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96c.01-35.35-27.79-64-63.99-64zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32v320zM144 192c26.5 0 48-21.5 48-48s-21.5-48-48-48-48 21.5-48 48 21.5 48 48 48zm0-64c8.822 0 15.1 7.178 15.1 16s-6.3 16-15.1 16-16-7.2-16-16 7.2-16 16-16z"
/>
</svg>
diff --git a/packages/studio/src/icons/gear.tsx b/packages/studio/src/icons/gear.tsx
index bb054325b9..928dcf1181 100644
--- a/packages/studio/src/icons/gear.tsx
+++ b/packages/studio/src/icons/gear.tsx
@@ -1,9 +1,10 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const GearIcon = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M168 255.1c0-47.7 39.4-88 88-88s88 40.3 88 88c0 49.5-39.4 88.9-88 88.9s-88-39.4-88-88.9zm88-56c-30.9 0-56 26-56 56 0 31.8 25.1 56 56 56s56-24.2 56-56c0-30-25.1-56-56-56zM65.67 230.6l-40.33-36.8c-11.12-10.1-13.68-26.6-6.16-39.6l30.24-52.4c7.52-13.02 23.09-19.05 37.42-14.48l51.96 16.58c13.4-10.34 28.2-18.94 44-25.47l11.7-53.27C197.7 10.47 210.7 0 225.8 0h60.4c15.1 0 28.1 10.47 31.3 25.16l11.7 53.27c14.9 6.53 30.6 15.13 44 25.47l52-16.58c14.3-4.57 29.9 1.46 37.4 14.48l30.2 52.4c7.5 13 5 29.5-6.1 39.6l-40.4 36.8c1.1 8.3 1.7 16.8 1.7 24.5 0 9.5-.6 18-1.7 26.3l40.4 36.8c11.1 10.1 13.6 26.6 6.1 39.6l-30.2 52.4c-7.5 13-23.1 19-37.4 14.5l-52-16.6c-13.4 10.3-29.1 18.9-44 25.5l-11.7 53.2c-3.2 14.7-16.2 25.2-31.3 25.2h-60.4c-15.1 0-28.1-10.5-31.3-25.2l-11.7-53.2c-15.8-6.6-30.6-15.2-44-25.5l-51.96 16.6c-14.33 4.5-29.9-1.5-37.42-14.5l-30.24-52.4c-7.52-13-4.96-29.5 6.16-39.6l40.33-36.8c-1.1-8.3-1.67-16.8-1.67-26.3 0-7.7.57-16.2 1.67-24.5zm92.73-101.4-13.3 10.3-67.97-21.7-30.24 52.4 52.69 48-2.19 16.6c-.92 6.9-1.39 14-1.39 20.3 0 8.1.47 15.2 1.39 22.1l2.19 16.6-52.69 48 30.24 52.4 67.97-21.7 13.3 10.3c11.1 8.6 23.5 15.8 36.6 20.3l15.5 7.3 15.3 69.6h60.4l15.3-69.6 14.6-7.3c14-4.5 26.4-11.7 37.5-20.3l13.3-10.3 68 21.7 30.2-52.4-52.7-48 2.2-16.6c.9-6.9 1.4-14 1.4-21.2 0-7.2-.5-14.3-1.4-21.2l-2.2-16.6 52.7-48-30.2-52.4-68 21.7-13.3-10.3c-11.1-8.6-23.5-15.8-37.5-21.2l-14.6-6.4L286.2 32h-60.4l-15.3 69.6L195 108c-13.1 5.4-25.5 12.6-36.6 21.2z"
/>
</svg>
diff --git a/packages/studio/src/icons/gif.tsx b/packages/studio/src/icons/gif.tsx
index 28f8c2d6f7..9c43b8c3fc 100644
--- a/packages/studio/src/icons/gif.tsx
+++ b/packages/studio/src/icons/gif.tsx
@@ -1,9 +1,10 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
export const GifIcon = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" {...props}>
<path
- fill="currentcolor"
+ fill={CURRENT_COLOR_LOWERCASE}
d="M512 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h448c35.35 0 64-28.65 64-64V96c0-35.35-28.7-64-64-64zm32 384c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h448c17.64 0 32 14.36 32 32v320zm-80-256h-96c-8.8 0-16 7.2-16 16v160c0 8.844 7.156 16 16 16s16-7.156 16-16v-64h56c8.844 0 16-7.156 16-16s-7.156-16-16-16h-56v-48h80c8.8 0 16-7.2 16-16s-7.2-16-16-16zm-160 0c-8.8 0-16 7.2-16 16v160c0 8.844 7.156 16 16 16s16-7.156 16-16V176c0-8.8-7.2-16-16-16zm-64 80h-64c-8.8 0-16 7.2-16 16s7.156 16 16 16h48v33.45c-24.83 19.91-69.13 18.16-91.48-4.203-24.95-24.95-24.95-65.55 0-90.5 25.03-25 64.19-25 89.22 0 6.25 6.25 16.38 6.25 22.62 0s6.25-16.38 0-22.62c-37.69-37.72-96.78-37.72-134.5 0-37.42 37.42-37.42 98.33 0 135.8C127.8 341.8 153.5 352 180.6 352c27.06 0 52.84-10.25 70.7-28.12 3-2.98 4.7-7.08 4.7-11.28V256c0-8.8-7.2-16-16-16z"
/>
</svg>
diff --git a/packages/studio/src/icons/jump-to-start.tsx b/packages/studio/src/icons/jump-to-start.tsx
index 35e6e7ad06..9a8ecc5943 100644
--- a/packages/studio/src/icons/jump-to-start.tsx
+++ b/packages/studio/src/icons/jump-to-start.tsx
@@ -1,10 +1,11 @@
import type {SVGProps} from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const JumpToStart: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M0 415.1V96.03c0-17.67 14.33-31.1 31.1-31.1C49.67 64.03 64 78.36 64 96.03v131.8l171.5-156.5C256.1 54.28 288 68.66 288 96.03v131.9l171.5-156.5C480.1 54.28 512 68.66 512 96.03v319.9c0 27.37-31.88 41.74-52.5 24.62L288 285.2v130.7c0 27.37-31.88 41.74-52.5 24.62L64 285.2v130.7c0 17.67-14.33 31.1-31.1 31.1C14.33 447.1 0 433.6 0 415.1z"
/>
</svg>
diff --git a/packages/studio/src/icons/keys.tsx b/packages/studio/src/icons/keys.tsx
index 081b805f60..49f92ed532 100644
--- a/packages/studio/src/icons/keys.tsx
+++ b/packages/studio/src/icons/keys.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
const iconStyle: React.CSSProperties = {
width: 10,
@@ -9,7 +10,7 @@ export const ShiftIcon: React.FC = () => {
return (
<svg style={iconStyle} viewBox="0 0 448 512">
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M48.048 304h73.798v128c0 26.51 21.49 48 48 48h108.308c26.51 0 48-21.49 48-48V304h73.789c42.638 0 64.151-51.731 33.941-81.941l-175.943-176c-18.745-18.745-49.137-18.746-67.882 0l-175.952 176C-16.042 252.208 5.325 304 48.048 304zM224 80l176 176H278.154v176H169.846V256H48L224 80z"
/>
</svg>
@@ -20,7 +21,7 @@ export const ArrowLeft: React.FC = () => {
return (
<svg style={iconStyle} viewBox="0 0 448 512">
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"
/>
</svg>
@@ -31,7 +32,7 @@ export const ArrowRight: React.FC = () => {
return (
<svg style={iconStyle} viewBox="0 0 448 512">
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
/>
</svg>
diff --git a/packages/studio/src/icons/media-volume.tsx b/packages/studio/src/icons/media-volume.tsx
index 283f681af8..d258879bd6 100644
--- a/packages/studio/src/icons/media-volume.tsx
+++ b/packages/studio/src/icons/media-volume.tsx
@@ -1,4 +1,4 @@
-import {BLUE} from '../helpers/colors';
+import {BLUE, WHITE_HEX} from '../helpers/colors';
const size = 22;
@@ -18,7 +18,7 @@ export const VolumeOnIcon: React.FC = () => {
<svg width={size} height={size} viewBox="0 0 24 24">
<path
d="M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z"
- fill="#fff"
+ fill={WHITE_HEX}
/>
</svg>
);
diff --git a/packages/studio/src/icons/minus.tsx b/packages/studio/src/icons/minus.tsx
index cfce3c95ef..3c7fc9e49d 100644
--- a/packages/studio/src/icons/minus.tsx
+++ b/packages/studio/src/icons/minus.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const Minus: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z"
/>
</svg>
diff --git a/packages/studio/src/icons/pause.tsx b/packages/studio/src/icons/pause.tsx
index f1beac24f6..1a4c8b3df9 100644
--- a/packages/studio/src/icons/pause.tsx
+++ b/packages/studio/src/icons/pause.tsx
@@ -1,5 +1,6 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const Pause: React.FC<SVGProps<SVGSVGElement>> = (props) => (
<svg
@@ -14,7 +15,7 @@ export const Pause: React.FC<SVGProps<SVGSVGElement>> = (props) => (
viewBox="0 0 448 512"
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"
/>
</svg>
diff --git a/packages/studio/src/icons/play.tsx b/packages/studio/src/icons/play.tsx
index 1e469f3f74..282f8ab30b 100644
--- a/packages/studio/src/icons/play.tsx
+++ b/packages/studio/src/icons/play.tsx
@@ -1,5 +1,6 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const Play: React.FC<SVGProps<SVGSVGElement>> = (props) => (
<svg
@@ -14,7 +15,7 @@ export const Play: React.FC<SVGProps<SVGSVGElement>> = (props) => (
viewBox="0 0 448 512"
>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"
/>
</svg>
diff --git a/packages/studio/src/icons/redo.tsx b/packages/studio/src/icons/redo.tsx
index 99e92624e3..502655f712 100644
--- a/packages/studio/src/icons/redo.tsx
+++ b/packages/studio/src/icons/redo.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const RedoIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg viewBox="0 0 640 640" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M552 256L408 256C398.3 256 389.5 250.2 385.8 241.2C382.1 232.2 384.1 221.9 391 215L437.7 168.3C362.4 109.7 253.4 115 184.2 184.2C109.2 259.2 109.2 380.7 184.2 455.7C259.2 530.7 380.7 530.7 455.7 455.7C463.9 447.5 471.2 438.8 477.6 429.6C487.7 415.1 507.7 411.6 522.2 421.7C536.7 431.8 540.2 451.8 530.1 466.3C521.6 478.5 511.9 490.1 501 501C401 601 238.9 601 139 501C39.1 401 39 239 139 139C233.3 44.7 382.7 39.4 483.3 122.8L535 71C541.9 64.1 552.2 62.1 561.2 65.8C570.2 69.5 576 78.3 576 88L576 232C576 245.3 565.3 256 552 256z"
/>
</svg>
diff --git a/packages/studio/src/icons/step-back.tsx b/packages/studio/src/icons/step-back.tsx
index 3ddf06256b..48dc6d4665 100644
--- a/packages/studio/src/icons/step-back.tsx
+++ b/packages/studio/src/icons/step-back.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const StepBack: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg viewBox="0 0 448 512" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z"
/>
</svg>
diff --git a/packages/studio/src/icons/step-forward.tsx b/packages/studio/src/icons/step-forward.tsx
index 3da383902d..a36349deb5 100644
--- a/packages/studio/src/icons/step-forward.tsx
+++ b/packages/studio/src/icons/step-forward.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const StepForward: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg viewBox="0 0 448 512" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"
/>
</svg>
diff --git a/packages/studio/src/icons/undo.tsx b/packages/studio/src/icons/undo.tsx
index 23c7174858..e3a41bcf7b 100644
--- a/packages/studio/src/icons/undo.tsx
+++ b/packages/studio/src/icons/undo.tsx
@@ -1,11 +1,12 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {CURRENT_COLOR} from '../helpers/colors';
export const UndoIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg viewBox="0 0 640 640" {...props}>
<path
- fill="currentColor"
+ fill={CURRENT_COLOR}
d="M88 256L232 256C241.7 256 250.5 250.2 254.2 241.2C257.9 232.2 255.9 221.9 249 215L202.3 168.3C277.6 109.7 386.6 115 455.8 184.2C530.8 259.2 530.8 380.7 455.8 455.7C380.8 530.7 259.3 530.7 184.3 455.7C174.1 445.5 165.3 434.4 157.9 422.7C148.4 407.8 128.6 403.4 113.7 412.9C98.8 422.4 94.4 442.2 103.9 457.1C113.7 472.7 125.4 487.5 139 501C239 601 401 601 501 501C601 401 601 239 501 139C406.8 44.7 257.3 39.3 156.7 122.8L105 71C98.1 64.2 87.8 62.1 78.8 65.8C69.8 69.5 64 78.3 64 88L64 232C64 245.3 74.7 256 88 256z"
/>
</svg>
diff --git a/packages/studio/src/previewEntry.tsx b/packages/studio/src/previewEntry.tsx
index b355f36907..d28aecf020 100644
--- a/packages/studio/src/previewEntry.tsx
+++ b/packages/studio/src/previewEntry.tsx
@@ -4,11 +4,12 @@ import {Internals} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
import {NoRegisterRoot} from './components/NoRegisterRoot';
import {startErrorOverlay} from './error-overlay/entry-basic';
+import {BACKGROUND_HEX} from './helpers/colors';
import {enableHotMiddleware} from './hot-middleware-client/client';
import {Studio} from './Studio';
Internals.CSSUtils.injectCSS(
- Internals.CSSUtils.makeDefaultPreviewCSS(null, '#1f2428'),
+ Internals.CSSUtils.makeDefaultPreviewCSS(null, BACKGROUND_HEX),
);
declare global {
diff --git a/packages/studio/src/renderEntry.tsx b/packages/studio/src/renderEntry.tsx
index bb6208ffea..1f3cd51449 100644
--- a/packages/studio/src/renderEntry.tsx
+++ b/packages/studio/src/renderEntry.tsx
@@ -26,6 +26,7 @@ import {
useDelayRender,
} from 'remotion';
import {NoReactInternals} from 'remotion/no-react';
+import {BACKGROUND_HEX, TRANSPARENT, WHITE} from './helpers/colors';
let currentBundleMode: BundleState = {
type: 'index',
@@ -40,7 +41,7 @@ const getBundleMode = () => {
};
Internals.CSSUtils.injectCSS(
- Internals.CSSUtils.makeDefaultPreviewCSS(null, '#1f2428'),
+ Internals.CSSUtils.makeDefaultPreviewCSS(null, BACKGROUND_HEX),
);
const getCanSerializeDefaultProps = (object: unknown) => {
@@ -84,7 +85,7 @@ const DelayedSpinner: React.FC = () => {
alignItems: 'center',
fontSize: 13,
opacity: 0.6,
- color: 'white',
+ color: WHITE,
fontFamily: 'Helvetica, Arial, sans-serif',
}}
>
@@ -167,7 +168,7 @@ const GetVideoComposition: React.FC<{
width: currentCompositionMetadata.width,
height: currentCompositionMetadata.height,
display: 'flex',
- backgroundColor: 'transparent',
+ backgroundColor: TRANSPARENT,
}}
/>
);