Support » Theme: Twenty Twenty » Custom color hex code for Primary Color

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Thread Starter quasiDigi

    (@quasidigi)

    Hi @macmanx,

    Being a dev myself, I, personally, disapprove the use of the !important css rule. In my opinion, it is the seed of a lot of clumsy, if not messy css.

    I disapprove it so much that I probably will look for another theme, or just build one.

    Nevertheless, thank you very much for your fast reply! 🙂

    hi @quasidigi
    this just to let you know that i changed the color of the links and of the “color-accent” class and did not need to use the !important rule
    v

    Thread Starter quasiDigi

    (@quasidigi)

    @eoik
    Does it also work for the buttons? For what I could see, those are inline styles given through js.

    • This reply was modified 1 year, 3 months ago by quasiDigi. Reason: typo

    @quasidigi
    absolutely, it does also work :
    button:not(.toggle), .button, .faux-button, .wp-block-button__link, .wp-block-file .wp-block-file__button, input[type=”button”], input[type=”reset”], input[type=”submit”], .bg-accent, .bg-accent-hover:hover, .bg-accent-hover:focus, :root .has-accent-background-color, .comment-reply-link {
    background-color:
    #ffbf00;
    }

    Thread Starter quasiDigi

    (@quasidigi)

    @eoik
    Ok, I see my confusion. I was trying to change the colours through the style.css of a child theme, and the only way to do this is through the option Appearance > Customize > Additional CSS.
    It took a while but I get it now.

    Thank you for your fast reply.

    In order to chose a specific “Primary Color” for Twenty Twenty (links, buttons, entry-categories-inner – maybe more?) I need to adjust all the instances in custom CSS / child theme CSS?

    Is there maybe another way via child theme – any functions.php adjustment?

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    It’s much safer and easier to do this in the Customizer’s Additional CSS section for each instance.

    Maintaining a Child Theme means that you’ll constantly need to keep an eye out for changes applied to the Parent Theme, and then apply them to your Child Theme files.

    Normally I’m a fan of Child Themes, but when the change can be made via the Customizer, it’s my opinion that’s the only way to do it. 🙂

    Thread Starter quasiDigi

    (@quasidigi)

    @macmanx except of course, if the colour is not the only change one wants to do.

    My frustration comes from the fact that in the past I used to some default WordPress themes as a base to make customized child themes. They are a good option because those themes are maintained for a long time. Even much longer than a lot of paid themes.

    I know it’s a general trend nowadays to make everything easier for the user, but understand that this is not the best solution for everyone.

    Also, I do not understand why, if I precisely know my colours, every time someone visits the site, there is a javascript calculating a whole colour chart based on a primary colour that is of no use, to be then overridden by the custom colours I have introduced in the customization screen? 😉

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Because if you’re making changes via CSS, that doesn’t change how the theme operates itself.

    The default color operation of the theme is quite extensive, so what you’re allowing it to do is run that operation, and then you override it via CSS.

    That’s pretty standard for more CSS customizations than you’d think. 😉

    If you want more control, try https://wordpress.org/themes/chaplin/ from the same designer.

    • This reply was modified 1 year, 3 months ago by James Huff.
    Thread Starter quasiDigi

    (@quasidigi)

    Hi @macmanx,

    Thank you for this recommendation! I started using it and it looks great 🙂

    Yea, I will def. look into Chaplin as well – I don’t really understand why you wouldn’t give the user more control over the color combination. Doesn’t seem to be a big thing to allow users enter their desired hex code.

    The primary color combination are too limited and what if they look awful in the combination with the background colors / header, footer colors 🤷‍♂️

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    I don’t really understand why you wouldn’t give the user more control over the color combination.

    The reasons are detailed at https://github.com/WordPress/twentytwenty/issues/284 but in short, it’s to ensure that the accent colors always met accessibility standards for visitors with limited vision, as accessibility was one of the primary focuses of this theme’s development.

    Lets say it was a bad idea to not add the ability to use hex code for main theme color.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Meeting accessibility standards for visitors with limited vision is never a bad idea, especially when accessibility was one of the primary focuses of this theme’s development.

    Changing the color is detailed in this thread, it’s not that difficult, and there are thousands of other free themes to choose from, including Chaplin which was the basis for this theme.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Custom color hex code for Primary Color’ is closed to new replies.