Skip to content

[FEAT] Define other frontmatter color_formats#127

Description

@ninetailedtori

This PR is focused on one thing in particular: simplification of syntax. Current solution for polling colours in other formats is use of ., and if we use .hex, we can customise that. Using other formats causes issues which are solved by writing a whole macro into the structure. What I propose is:

  • allow users to define "hex_format", "rgb_format", "hsl_format", etc for all color outputs.
  • this then reduces the need for a whole macro, making all the tera styles we have easier.
  • users then can display several formats, for rgb, hsl, hex, with the correct format for all.

The solution I had once before was refactoring hex_format to a color_format, but the issue is, I think that some tera styles DO use multiple formats? Which would break this. But if this might be wrong, we could do that:

  • remove hex_format
  • replace with color_format
  • have values such as hex.r, rgb.b, hsl.l, hex.a, rgb.a, oklch.c, etc.

Would love to hear opinions on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions