Skip to content

Commit

Permalink
picker
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoLuglio committed Oct 15, 2024
1 parent 874aba5 commit b775bde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ThemeControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const ThemeControls: React.FC = () => {
// Add small random variations to the current values
const hueVariation = Math.floor(Math.random() * 30) - 15 // -15 to +15
const saturationVariation = Math.floor(Math.random() * 20) - 10 // -10 to +10
const syntaxSaturationVariation = Math.floor(Math.random() * 20) - 10 // -10 to +10

const newBaseHue = (baseHue + hueVariation + 360) % 360
const newUiSaturation = Math.max(
Expand All @@ -95,7 +96,7 @@ const ThemeControls: React.FC = () => {
)
const newSyntaxSaturation = Math.max(
0,
Math.min(100, syntaxSaturation + saturationVariation)
Math.min(100, syntaxSaturation + syntaxSaturationVariation)
)

setBaseHue(newBaseHue)
Expand Down

0 comments on commit b775bde

Please sign in to comment.