Skip to content

Commit

Permalink
feat: use beige as grapher background color
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed May 23, 2024
1 parent 5a75af7 commit b1cee94
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $controlRowHeight: 32px; // keep in sync with CONTROLS_ROW_HEIGHT

.CaptionedChart {
width: 100%;
background-color: $grapher-background-color;
}

.HeaderHTML,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
Patterns,
STATIC_EXPORT_DETAIL_SPACING,
DEFAULT_GRAPHER_FRAME_PADDING,
GRAPHER_BACKGROUND_COLOR,
} from "../core/GrapherConstants"
import { MapChartManager } from "../mapCharts/MapChartConstants"
import { ChartManager } from "../chart/ChartManager"
Expand Down Expand Up @@ -491,7 +492,6 @@ export class CaptionedChart extends React.Component<CaptionedChartProps> {
fontFamily:
"Lato, 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif",
fontSize: this.manager.fontSize ?? BASE_FONT_SIZE,
backgroundColor: "white",
textRendering: "geometricPrecision",
WebkitFontSmoothing: "antialiased",
},
Expand Down Expand Up @@ -618,7 +618,7 @@ export class StaticCaptionedChart extends CaptionedChart {
{this.patterns}
<rect
className="background-fill"
fill="white"
fill={GRAPHER_BACKGROUND_COLOR}
width={width}
height={height}
/>
Expand Down
2 changes: 2 additions & 0 deletions packages/@ourworldindata/grapher/src/core/GrapherConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const DEFAULT_GRAPHER_HEIGHT = 600
export const DEFAULT_GRAPHER_FRAME_PADDING = 16
export const STATIC_EXPORT_DETAIL_SPACING = 8

export const GRAPHER_BACKGROUND_COLOR = "#fbf9f3" // beige

export const GRAPHER_DARK_TEXT = "#5b5b5b"
export const GRAPHER_LIGHT_TEXT = "#858585"

Expand Down
1 change: 1 addition & 0 deletions packages/@ourworldindata/grapher/src/core/grapher.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "./typography.scss";

// grapher frame
$grapher-background-color: $beige;
$frame-color: #f2f2f2;

// text
Expand Down

0 comments on commit b1cee94

Please sign in to comment.