Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/blog-background/MeteorsBackground.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useRef } from 'react';
import { blogPalette } from '../blog-palette';

type CanvasBounds = {
width: number;
Expand Down Expand Up @@ -127,10 +128,16 @@ class Meteor {
}

const gradient = context.createLinearGradient(startX, startY, endX, endY);
gradient.addColorStop(0, `rgba(18, 229, 229, ${this.opacity})`);
gradient.addColorStop(0.02, `rgba(18, 229, 229, ${this.opacity * 0.8})`);
gradient.addColorStop(0.05, `rgba(255, 53, 26, ${this.opacity * 0.6})`);
gradient.addColorStop(1, 'rgba(255, 53, 26, 0)');
gradient.addColorStop(0, `rgba(${blogPalette.gold}, ${this.opacity})`);
gradient.addColorStop(
0.02,
`rgba(${blogPalette.gold}, ${this.opacity * 0.8})`,
);
gradient.addColorStop(
0.05,
`rgba(${blogPalette.orange}, ${this.opacity * 0.6})`,
);
gradient.addColorStop(1, `rgba(${blogPalette.orange}, 0)`);

context.beginPath();
context.strokeStyle = gradient;
Expand Down
8 changes: 4 additions & 4 deletions src/blog-background/glow-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/blog-background/glow-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/blog-list/BorderBeam.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useRef } from 'react';
import { blogPalette } from '../blog-palette';
import styles from './BorderBeam.module.scss';

type ResizeSubscription = {
Expand All @@ -14,7 +15,7 @@ export type BorderBeamProps = {
};

export function BorderBeam({
color = '#12e5e5',
color = `rgb(${blogPalette.gold})`,
size = 3,
duration = 4,
className,
Expand Down Expand Up @@ -130,9 +131,9 @@ export function BorderBeam({
);

gradient.addColorStop(0, 'transparent');
gradient.addColorStop(0.2, 'rgba(255, 53, 26, 0.3)');
gradient.addColorStop(0.5, '#ff351a');
gradient.addColorStop(0.8, '#ff351a');
gradient.addColorStop(0.2, `rgba(${blogPalette.orange}, 0.3)`);
gradient.addColorStop(0.5, `rgb(${blogPalette.orange})`);
gradient.addColorStop(0.8, `rgb(${blogPalette.orange})`);
gradient.addColorStop(0.9, color);
gradient.addColorStop(1, 'transparent');

Expand Down
6 changes: 6 additions & 0 deletions src/blog-palette.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RGB channels keep the Rstack accents consistent across canvas gradients
// while allowing each animation to control its own opacity.
export const blogPalette = {
gold: '255, 210, 89',
orange: '245, 137, 97',
};
Loading