Skip to content

Extend Theme Config with Theme Presets #10

Description

@rozd

Extend the config to optionally include actual values:

 {
    "styles": {
      "colors": ["surface", "primary"]
    },
    "themes": {
      "default": {
        "colors": {
          "surface": { "light": "#FFFFFF", "dark": "#1C1C1E" },
          "primary": { "light": "#007AFF", "dark": "#0A84FF" }
        }
      },
      "forest": {
        "colors": {
          "surface": { "light": "#F5F5DC", "dark": "#2D3B2D" },
          "primary": { "light": "#228B22", "dark": "#90EE90" }
        }
      }
    }
  }

The generator would produce a fully populated Theme+Defaults.swift with static let default, static let forest, etc.

Thoughts

  • makes more sense if theme presets come from another system or a design tool.
  • switch between light/dark is must have, but runtime switching a whole theme is probably a rare use case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions