GithubHelp home page GithubHelp logo

Comments (2)

marcelohdez avatar marcelohdez commented on August 15, 2024

My hunch after a quick glance is that we generate colors in this function:

let colors: Colors = generate_colors(schemes, source_color, default_scheme)?;

Which uses default_scheme which is only generated by the args in main.rs:

matugen/src/main.rs

Lines 68 to 70 in d2a268b

let default_scheme = args
.mode
.expect("Something went wrong while parsing the mode");

But, we never read each template's mode when creating them, only the same colors variable as above:
let data = engine
.template(name)
.render(upon::value! { colors: &colors, image: image, custom: &custom, })
.to_string()
.map_err(|error| {
let message = format!(
"[{} - {}]\n{:#}",
name,
input_path_absolute.display(),
error
);
Report::new(error).wrap_err(message)
})?;

(But I may be dumb, let me know if I am doing something incorrectly)

from matugen.

InioX avatar InioX commented on August 15, 2024

Hi @marcelohdez! Sorry for the very delayed response.

If you want the color to be always dark, you can specify the mode inside the keyword like this:

{{colors.<keyword>.dark.<format>}}

As for not reading the mode from the template, I rewrote the template code a while ago and completely forgot about it. Implementing it back would require to generate the colors for every template inside the loop and I think specifying the mode inside the keyword is enough. I will rewrite the documentation and remove the mode from config.

from matugen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.