leonardo icon indicating copy to clipboard operation
leonardo copied to clipboard

fix: parse saturation param from theme URL config

Open teyepe opened this issue 1 month ago • 1 comments

Description

This PR fixes a bug where the saturation parameter in theme URL configs is ignored, causing themes to always load with 100% saturation regardless of the URL parameter value.

Problem

When users share Leonardo theme URLs with a specific saturation value in the config (e.g., "saturation": 20), the web UI ignores this parameter and defaults to 100% saturation. This breaks the ability to share complete theme configurations via URL.

Fix

Added saturation parameter parsing that:

  1. Reads config.saturation from the URL parameter
  2. Defaults to 100 if not specified (maintaining backward compatibility)
  3. Updates the saturation slider UI element
  4. Updates the saturation display label
  5. Sets _theme.saturation property

The implementation follows the exact same pattern used for the existing contrast parameter (lines 112-116), ensuring consistency with the codebase. The fix is minimal and improves theme sharing.

  • [ x] I have read the CONTRIBUTING document.
  • [ x] This pull request is ready to merge.

teyepe avatar Nov 07 '25 22:11 teyepe

⚠️ No Changeset found

Latest commit: d41adbf436e80c9251b32351824b6bf9849125c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 07 '25 22:11 changeset-bot[bot]