-
Notifications
You must be signed in to change notification settings - Fork 18
Filters
ini edited this page Nov 3, 2024
·
3 revisions
Click to expand
{{ colors.source_color.default.rgba | set_alpha: 0.5 }}
- Only for hsla
{{ colors.source_color.default.rgba | set_hue: -180.0 }}
{{ colors.source_color.default.rgba | set_hue: 90.0 }}
Click to expand
{{ colors.source_color.default.rgba | grayscale }}
{{ colors.source_color.default.rgba | invert }}
- Increases/Decreases lightness of the provided color
- Can be used on normal strings and color keywords too
- Automatically gets the format from the string and outputs it as the same one
{{ "#ffbf9b" | set_lightness: 10.0}}
{{ "rgb(255,255,255)" | set_lightness: 10.0}}
{{ colors.source_color.default.rgb | set_lightness: 20.0 }}
{{ colors.source_color.default.rgb | set_lightness: -20.0 }}
- #ff0000 as hex color input gives
- (light to dark)
-
{{ colors.primary_container.default.hex }}
-#ffdad4
-
{{ colors.primary_container.default.hex | auto_lightness: 20.0 }}
-#ff826e
-
- (dark to light)
-
{{ colors.primary_container.default.hex }}
-#73342a
-
{{ colors.primary_container.default.hex | auto_lightness: 20.0 }}
-#bc5747
-
- (light to dark)
Click to expand
- Example:
- primary_container -> primaryContainer
- secondary_container -> secondaryContainer
<* for name, value in colors *>
${{name | camel_case}}: {{value.default.hex}};
<* endfor *>
- This will replace
_
with-
for every color. - For example:
surface_dim
->surface-dim
.
{{ "foo" | replace: "foo", "bar" }}
<* for name, value in colors *>
{{name | replace: "_", "-" }} {{value.default.hex}};
<* endfor *>
{{ "TEST" | to_lower }}
{{ "test" | to_upper }}