Skip to content
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

feat(filter): add camel_case filter and auto_lightness filter #114

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

TanX-009
Copy link
Contributor

@TanX-009 TanX-009 commented Oct 20, 2024

Add camel_case filter

primary_container -> primaryContainer
secondary_container -> secondaryContainer

Usage

<* for name, value in colors *>
${{name | camel_case}}: {{value.default.hex}};
<* endfor *>

Add auto_lightness filter

  • #ff0000 as hex color input gives
    • (light to dark)
      {{ colors.primary_container.default.hex }} gives #ffdad4
      {{ colors.primary_container.default.hex | auto_lightness: 20.0 }} gives #ff826e
    • (dark to light)
      {{ colors.primary_container.default.hex }} gives #73342a
      {{ colors.primary_container.default.hex | auto_lightness: 20.0 }} gives #bc5747

auto_lightness filter increases lightness if under 50.0 and decreases
lightness if above 50.0
@TanX-009 TanX-009 changed the title feat(filter): add camel_case filter feat(filter): add camel_case filter and auto_lightness filter Oct 20, 2024
@InioX InioX merged commit d0761e5 into InioX:main Oct 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants