-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define variable in puml files to reference color #54
Comments
Hi @bschwarz, Thanks for the suggestion which I can see help reduce the complexity of coloring the icons in PUML diagrams. Depending upon the next release of the AWS Icon set we may incorporate into that sprint. |
I do have colors defined in
Example of usage from
and multiple examples in https://github.com/awslabs/aws-icons-for-plantuml/tree/main/examples/architecture-blog Do you think using |
Yes, I do believe Another option would be to have some sort of puml lookup function, so you could do get_color("lambda"), but this might be a little harder to implement...although might be better from a user experience. |
Do you think per service and resource colors would be too many, vs using the categories from AWSSymbols.md like The |
To better document the color definitions, I'm thinking of adding this table this into AWSSymbols.md
|
Yes, that would be good to have. I also would almost like to see the reverse table, where the first column is either the category or resource, because when I am looking up a color for reference, I am usually looking to see which color corresponds to a particular resource. At least that is 90% of my use cases. |
Update to Release 15 (2023.01.31) of AWS Architecture Icons and address issues #54 and #55. Full formatted **Release Notes** below. --- To reference files specific to this release, define `AWSPuml` to: `!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v15.0/dist` This release recreates the icons based on the 2023-01-31 (15-2023.01.31) updated AWS Architecture Icons. ## Updates - Updated to Release 15 (2023.01.31) of [AWS Architecture Icons](https://aws.amazon.com/architecture/icons/) - New icons in the `Analytics`, `ApplicationIntegration`, `BusinessApplications`, `Compute`, `Containers`, `Database`, `DeveloperTools`, `EndUserComputing`, `InternetOfThings`, `MachineLearning`, `ManagementGovernance`, `MigrationTransfer`, `NetworkingContentDelivery`, `SecurityIdentityCompliance`, and `Storage` categories. - Document color definitions on `AWSSymbols.md` ([issue 54](#54)) - Enhance `AWSSimplified.puml` to support sequence diagrams ([issue 55](#55)) - Updated to use latest PlantUML version (1.2023.1) - Updated to use latest Apache Batik version (1.16) - Experimental support for numbered callouts using SVG sprites in `AWSExperimental.puml` ## Breaking Changes - In the `Compute` category: - `EC2R5dInstance` and `EC2RdnInstance` were removed - In the `Containers` category: - `RedHatOpenShift` was replaced by `RedHatOpenShiftServiceonAWS` - In the `Database` category: - `QuantumLedgerDatabase2` was removed - In the `EndUserComputing` category: - `WorkSpaces` was replaced by `WorkSpacesFamilyAmazonWorkSpaces` - `WorkSpacesWeb` was replaced by `WorkSpacesFamilyAmazonWorkSpacesWeb` - The `GameTech` category was replaced by `Games` - In the `Storage` category: - `CloudEndureDisasterRecovery` was replaced by `ElasticDisasterRecovery`
Define a variable for each puml file that defines the color for that resource based on the category color. This way the color for the resource can be referenced directly instead of looking up the color manually. For example, using this value in sequence diagrams activate bars.
I believe there is just a small changed needed in
icon.py
, in thegenerate_puml()
method:puml_content += f"!define AWS_COLOR_{target} {color}\n\n"
which will produce, for example:
!define AWS_COLOR_Lambda #D86613
or perhaps for capitalized:
puml_content += f"!define AWS_COLOR_{target.upper()} {color}\n\n"
which will produce, for example:
!define AWS_COLOR_LAMBDA #D86613
The text was updated successfully, but these errors were encountered: