Open essentivit opened 2 months ago
After consideration, we have decided to proceed using one JSON file for palettes and one JSON file for configurations.
This decision is based on the expectation that the number of configurations will remain between 100 and 200. Given this scale, managing palettes and configurations within centralised files is both efficient and straightforward for the current scope of the project. It simplifies maintenance and access without introducing unnecessary complexity.
Example: palettes.json
{
"palettes": [
{
"id": "essential_vitamin",
"name": "Essential Vitamin",
"colors": [
[178, 223, 138],
[166, 206, 227],
[51, 160, 44],
[251, 154, 153],
[227, 26, 28]
]
},
{
"id": "pet_supplement",
"name": "Pet Supplement",
"colors": [
[253, 191, 111],
[31, 120, 180],
[106, 61, 154],
[202, 178, 220],
[177, 89, 40]
]
},
{
"id": "beauty_product",
"name": "Beauty Product",
"colors": [
[255, 204, 229],
[255, 153, 204],
[204, 102, 153],
[153, 51, 102],
[102, 0, 51]
]
}
]
}
Example: configurations.json
{
"configurations": [
{
"id": "config_01",
"seed": 123456,
"palette": "essential_vitamin",
"timestamp": "2024-09-22T12:34:56",
"description": "Default essential vitamin pattern for product label."
},
{
"id": "config_02",
"seed": 7891011,
"palette": "pet_supplement",
"timestamp": "2024-09-23T14:22:01",
"description": "Pet supplement branding for new product line."
},
{
"id": "config_03",
"seed": 11223344,
"palette": "beauty_product",
"timestamp": "2024-09-24T10:15:32",
"description": "Beauty product packaging pattern."
}
]
}
In preparation for the requested feature, we've made the following key changes:
Replaced CSV with JSON: The palette data is now stored in a palettes.json
file for better structure, maintainability, and scalability.
id
, name
, and a list of RGB color values.Updated Pattern Generation Logic: The app now loads palettes from the JSON format, replacing all CSV-based logic.
Version Bump: We have tagged the project with v2.0.0 due to this backward-incompatible change.
These changes are foundational for the upcoming feature that will allow users to select palettes and save pattern configurations for specific products.
Feature Request: Palette Selection & Product Configurations
Summary: We need to enhance the pattern generation app by introducing a feature that allows users to select specific palette combinations through a dropdown menu. These palettes should correspond to defined palettes for particular products. Additionally, the app should provide functionality to save and reuse these seed and palette configurations for future use. The goal is to allow both random generation and defined palette combinations while ensuring the ability to regenerate patterns for specific products.
Detailed Requirements:
Palette Selection UI:
Random Palette Generation:
Switching from CSV to a More Suitable Format:
Saving & Loading Configurations:
Regenerating Saved Configurations:
Versioning and Maintenance:
Acceptance Criteria:
Dependencies: